Class: Micdrop::Ext::Microfocus::Record

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/micdrop/ext/microfocus.rb

Overview

Representation of a single record within a file

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#bodyObject (readonly)

Returns the value of attribute body.



50
51
52
# File 'lib/micdrop/ext/microfocus.rb', line 50

def body
  @body
end

#fieldsObject (readonly)

Returns the value of attribute fields.



50
51
52
# File 'lib/micdrop/ext/microfocus.rb', line 50

def fields
  @fields
end

#typeObject (readonly)

Returns the value of attribute type.



50
51
52
# File 'lib/micdrop/ext/microfocus.rb', line 50

def type
  @type
end