Class: Dspace::Metadata
- Inherits:
-
Object
- Object
- Dspace::Metadata
- Defined in:
- lib/dspace/metadata.rb
Instance Attribute Summary collapse
-
#key ⇒ Object
Returns the value of attribute key.
-
#language ⇒ Object
Returns the value of attribute language.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(args) ⇒ Metadata
constructor
A new instance of Metadata.
- #to_h ⇒ Object
Constructor Details
#initialize(args) ⇒ Metadata
Returns a new instance of Metadata.
5 6 7 8 9 |
# File 'lib/dspace/metadata.rb', line 5 def initialize args @key = args['key'] @value = args['value'] @language = args['language'] || nil end |
Instance Attribute Details
#key ⇒ Object
Returns the value of attribute key.
3 4 5 |
# File 'lib/dspace/metadata.rb', line 3 def key @key end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/dspace/metadata.rb', line 3 def language @language end |
#value ⇒ Object
Returns the value of attribute value.
3 4 5 |
# File 'lib/dspace/metadata.rb', line 3 def value @value end |
Instance Method Details
#to_h ⇒ Object
11 12 13 |
# File 'lib/dspace/metadata.rb', line 11 def to_h {key: @key, value: @value, language: @language} end |