Class: Mab2::Document::Subfield

Inherits:
Object
  • Object
show all
Defined in:
lib/mab2/document/subfield.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ Subfield

Returns a new instance of Subfield.



5
6
7
8
# File 'lib/mab2/document/subfield.rb', line 5

def initialize(hash)
  @name = hash.keys.first
  @value = hash.values.first
end

Instance Attribute Details

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/mab2/document/subfield.rb', line 3

def name
  @name
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/mab2/document/subfield.rb', line 3

def value
  @value
end