Class: DSpaceRest::Metadata
- Inherits:
-
Object
- Object
- DSpaceRest::Metadata
- Defined in:
- lib/dspacerest/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.
6 7 8 9 10 |
# File 'lib/dspacerest/metadata.rb', line 6 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.
4 5 6 |
# File 'lib/dspacerest/metadata.rb', line 4 def key @key end |
#language ⇒ Object
Returns the value of attribute language.
4 5 6 |
# File 'lib/dspacerest/metadata.rb', line 4 def language @language end |
#value ⇒ Object
Returns the value of attribute value.
4 5 6 |
# File 'lib/dspacerest/metadata.rb', line 4 def value @value end |
Instance Method Details
#to_h ⇒ Object
12 13 14 |
# File 'lib/dspacerest/metadata.rb', line 12 def to_h {key: @key, value: @value, language: @language} end |