Class: DPLibrary::OriginalRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/DPLibrary/original_record.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(hash) ⇒ OriginalRecord

Returns a new instance of OriginalRecord.



16
17
18
# File 'lib/DPLibrary/original_record.rb', line 16

def initialize(hash)
  set_values(hash)
end

Instance Attribute Details

#creatorObject

Returns the value of attribute creator.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def creator
  @creator
end

#dateObject

Returns the value of attribute date.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def date
  @date
end

#descriptionObject

Returns the value of attribute description.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def description
  @description
end

#idObject

Returns the value of attribute id.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def id
  @id
end

#labelObject

Returns the value of attribute label.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def label
  @label
end

#languageObject

Returns the value of attribute language.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def language
  @language
end

#publisherObject

Returns the value of attribute publisher.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def publisher
  @publisher
end

#sourceObject

Returns the value of attribute source.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def source
  @source
end

#subjectObject

Returns the value of attribute subject.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def subject
  @subject
end

#titleObject

Returns the value of attribute title.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def title
  @title
end

#typeObject

Returns the value of attribute type.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def type
  @type
end

#urlObject

Returns the value of attribute url.



3
4
5
# File 'lib/DPLibrary/original_record.rb', line 3

def url
  @url
end

Instance Method Details

#set_values(hash) ⇒ Object



20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/DPLibrary/original_record.rb', line 20

def set_values(hash)
  self.id = hash['id']
  self.title = hash['title']
  self.url = hash['handle']
  self.source = hash['contributor']
  self.description = hash['description']
  self.subject = hash['subject']
  self.date = hash['datestamp']
  self.label = hash['label']
  self.language = hash['language']
  self.type = hash['type']
  self.creator = hash['creator']
  self.publisher = hash['publisher']
end