make binary code indexed (not derive from word)

still some work to be done there, as we should really have a byte buffer
This commit is contained in:
Torsten Ruger
2015-10-26 12:24:47 +02:00
parent 96f43dcfda
commit 1a236aa50e
2 changed files with 11 additions and 13 deletions

View File

@ -9,18 +9,17 @@
module Parfait
# obviously not a "Word" but a ByteArray , but no such class yet
# As on the other hand has no encoding (yet) it is close enough
class BinaryCode < Word
def initialize name
super(0)
self.name = name
end
class BinaryCode < Object
attribute :name
# this is a sof check if there are instance variables or "structure"
# have to override false, as word answers true
def is_value?
false
include Indexed
self.offset(2)
def initialize name
super()
self.name = name
end
def to_s
"BinaryCode #{self.name}"
end