Class: Micdrop::Ext::Microfocus::Record
- Inherits:
-
Object
- Object
- Micdrop::Ext::Microfocus::Record
- Extended by:
- Forwardable
- Defined in:
- lib/micdrop/ext/microfocus.rb
Overview
Representation of a single record within a file
Instance Attribute Summary collapse
-
#body ⇒ Object
readonly
Returns the value of attribute body.
-
#fields ⇒ Object
readonly
Returns the value of attribute fields.
-
#type ⇒ Object
readonly
Returns the value of attribute type.
Instance Method Summary collapse
-
#initialize(type, body, unpack_spec: nil, unpack_mapping: nil) ⇒ Record
constructor
A new instance of Record.
Constructor Details
#initialize(type, body, unpack_spec: nil, unpack_mapping: nil) ⇒ Record
Returns a new instance of Record.
43 44 45 46 47 48 |
# File 'lib/micdrop/ext/microfocus.rb', line 43 def initialize(type, body, unpack_spec: nil, unpack_mapping: nil) @type = type @body = body @fields = nil unpack unpack_spec, unpack_mapping unless unpack_spec.nil? end |
Instance Attribute Details
#body ⇒ Object (readonly)
Returns the value of attribute body.
50 51 52 |
# File 'lib/micdrop/ext/microfocus.rb', line 50 def body @body end |
#fields ⇒ Object (readonly)
Returns the value of attribute fields.
50 51 52 |
# File 'lib/micdrop/ext/microfocus.rb', line 50 def fields @fields end |
#type ⇒ Object (readonly)
Returns the value of attribute type.
50 51 52 |
# File 'lib/micdrop/ext/microfocus.rb', line 50 def type @type end |