Class: DPLibrary::OriginalRecord
- Inherits:
-
Object
- Object
- DPLibrary::OriginalRecord
- Defined in:
- lib/DPLibrary/original_record.rb
Instance Attribute Summary collapse
-
#creator ⇒ Object
Returns the value of attribute creator.
-
#date ⇒ Object
Returns the value of attribute date.
-
#description ⇒ Object
Returns the value of attribute description.
-
#id ⇒ Object
Returns the value of attribute id.
-
#label ⇒ Object
Returns the value of attribute label.
-
#language ⇒ Object
Returns the value of attribute language.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#source ⇒ Object
Returns the value of attribute source.
-
#subject ⇒ Object
Returns the value of attribute subject.
-
#title ⇒ Object
Returns the value of attribute title.
-
#type ⇒ Object
Returns the value of attribute type.
-
#url ⇒ Object
Returns the value of attribute url.
Instance Method Summary collapse
-
#initialize(hash) ⇒ OriginalRecord
constructor
A new instance of OriginalRecord.
- #set_values(hash) ⇒ Object
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
#creator ⇒ Object
Returns the value of attribute creator.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def creator @creator end |
#date ⇒ Object
Returns the value of attribute date.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def date @date end |
#description ⇒ Object
Returns the value of attribute description.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def description @description end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def id @id end |
#label ⇒ Object
Returns the value of attribute label.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def label @label end |
#language ⇒ Object
Returns the value of attribute language.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def language @language end |
#publisher ⇒ Object
Returns the value of attribute publisher.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def publisher @publisher end |
#source ⇒ Object
Returns the value of attribute source.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def source @source end |
#subject ⇒ Object
Returns the value of attribute subject.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def subject @subject end |
#title ⇒ Object
Returns the value of attribute title.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def title @title end |
#type ⇒ Object
Returns the value of attribute type.
3 4 5 |
# File 'lib/DPLibrary/original_record.rb', line 3 def type @type end |
#url ⇒ Object
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 |