Class: Rubytus::Info
- Inherits:
-
Hash
- Object
- Hash
- Rubytus::Info
- Defined in:
- lib/rubytus/info.rb
Instance Method Summary collapse
- #final_length ⇒ Object
- #final_length=(value) ⇒ Object
-
#initialize(args = {}) ⇒ Info
constructor
A new instance of Info.
- #offset ⇒ Object
- #offset=(value) ⇒ Object
- #remaining_length ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Info
Returns a new instance of Info.
5 6 7 8 9 |
# File 'lib/rubytus/info.rb', line 5 def initialize(args = {}) self['Offset'] = args[:offset] || 0 self['FinalLength'] = args[:final_length] || 0 self['Meta'] = args[:meta] || nil end |
Instance Method Details
#final_length ⇒ Object
23 24 25 |
# File 'lib/rubytus/info.rb', line 23 def final_length self['FinalLength'] end |
#final_length=(value) ⇒ Object
19 20 21 |
# File 'lib/rubytus/info.rb', line 19 def final_length=(value) self['FinalLength'] = value.to_i end |
#offset ⇒ Object
15 16 17 |
# File 'lib/rubytus/info.rb', line 15 def offset self['Offset'] end |
#offset=(value) ⇒ Object
11 12 13 |
# File 'lib/rubytus/info.rb', line 11 def offset=(value) self['Offset'] = value.to_i end |
#remaining_length ⇒ Object
27 28 29 |
# File 'lib/rubytus/info.rb', line 27 def remaining_length final_length - offset end |