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:
@ -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
|
||||
|
Reference in New Issue
Block a user