Class: Dspace::Metadata

Inherits:
Object
  • Object
show all
Defined in:
lib/dspace/metadata.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#keyObject

Returns the value of attribute key.



3
4
5
# File 'lib/dspace/metadata.rb', line 3

def key
  @key
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/dspace/metadata.rb', line 3

def language
  @language
end

#valueObject

Returns the value of attribute value.



3
4
5
# File 'lib/dspace/metadata.rb', line 3

def value
  @value
end

Instance Method Details

#to_hObject



11
12
13
# File 'lib/dspace/metadata.rb', line 11

def to_h
  {key: @key, value: @value, language: @language}
end