Class: Mab2::Document::Subfield
- Inherits:
-
Object
- Object
- Mab2::Document::Subfield
- Defined in:
- lib/mab2/document/subfield.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(hash) ⇒ Subfield
constructor
A new instance of Subfield.
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
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/mab2/document/subfield.rb', line 3 def name @name end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/mab2/document/subfield.rb', line 3 def value @value end |