Class: WORF::Tag::FixedWidthTag
Constant Summary
Constants inherited from WORF::Tag
Instance Attribute Summary
Attributes inherited from WORF::Tag
Instance Method Summary collapse
- #decode(io, _) ⇒ Object
-
#initialize(index, type, has_children, attr_names, attr_forms, unpack, readlen) ⇒ FixedWidthTag
constructor
A new instance of FixedWidthTag.
Methods inherited from WORF::Tag
#attribute_info, build, #has_children?, #identifier, #index_of, #inspect, #user?
Constructor Details
#initialize(index, type, has_children, attr_names, attr_forms, unpack, readlen) ⇒ FixedWidthTag
Returns a new instance of FixedWidthTag.
50 51 52 53 54 |
# File 'lib/worf.rb', line 50 def initialize index, type, has_children, attr_names, attr_forms, unpack, readlen super(index, type, has_children, attr_names, attr_forms) @unpack = unpack @readlen = readlen end |
Instance Method Details
#decode(io, _) ⇒ Object
56 57 58 |
# File 'lib/worf.rb', line 56 def decode io, _ io.read(@readlen).unpack(@unpack) end |