Class: FormatParser::DPXParser::Binstr::Capture
- Inherits:
-
Struct
- Object
- Struct
- FormatParser::DPXParser::Binstr::Capture
- Includes:
- IOUtils
- Defined in:
- lib/parsers/dpx_parser/dpx_structs.rb
Constant Summary
Constants included from IOUtils
Instance Attribute Summary collapse
-
#bytes ⇒ Object
Returns the value of attribute bytes.
-
#pattern ⇒ Object
Returns the value of attribute pattern.
Instance Method Summary collapse
Methods included from IOUtils
#read_bytes, #read_fixed_point, #read_int, #safe_read, #safe_skip, #skip_bytes
Instance Attribute Details
#bytes ⇒ Object
Returns the value of attribute bytes
9 10 11 |
# File 'lib/parsers/dpx_parser/dpx_structs.rb', line 9 def bytes @bytes end |
#pattern ⇒ Object
Returns the value of attribute pattern
9 10 11 |
# File 'lib/parsers/dpx_parser/dpx_structs.rb', line 9 def pattern @pattern end |
Instance Method Details
#read_and_unpack(io) ⇒ Object
11 12 13 14 |
# File 'lib/parsers/dpx_parser/dpx_structs.rb', line 11 def read_and_unpack(io) platform_byte_order_pattern = io.le? ? TO_LITTLE_ENDIAN.fetch(pattern, pattern) : pattern safe_read(io, bytes).unpack(platform_byte_order_pattern).first end |