Class: BitStream::NestWrapper

Inherits:
Object
  • Object
show all
Defined in:
lib/bitstream.rb

Instance Method Summary collapse

Constructor Details

#initialize(type, inherited_props, user_props) ⇒ NestWrapper

Returns a new instance of NestWrapper.



95
96
97
98
99
# File 'lib/bitstream.rb', line 95

def initialize(type, inherited_props, user_props)
  @type = type
  # TODO: Implement priority between the properties.
  @props = user_props.merge(inherited_props)
end

Instance Method Details

#lengthObject



101
102
103
104
# File 'lib/bitstream.rb', line 101

def length
  # TODO: Implement me.
  nil
end

#read(s, offset) ⇒ Object



106
107
108
109
# File 'lib/bitstream.rb', line 106

def read(s, offset)
  instance = @type.create_with_offset(s, offset, @props)
  return FieldInfo.new(instance, instance.length)
end