Class: BitStream::NestWrapper
- Inherits:
-
Object
- Object
- BitStream::NestWrapper
- Defined in:
- lib/bitstream.rb
Instance Method Summary collapse
-
#initialize(type, inherited_props, user_props) ⇒ NestWrapper
constructor
A new instance of NestWrapper.
- #length ⇒ Object
- #read(s, offset) ⇒ Object
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
#length ⇒ Object
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 |