Class: WCKBAPI::Entry
- Inherits:
-
Object
- Object
- WCKBAPI::Entry
- Defined in:
- lib/wckbapi/entry.rb
Instance Attribute Summary collapse
-
#author ⇒ Object
Returns the value of attribute author.
-
#bkey ⇒ Object
Returns the value of attribute bkey.
-
#collection_name ⇒ Object
Returns the value of attribute collection_name.
-
#collection_uid ⇒ Object
Returns the value of attribute collection_uid.
-
#coverage ⇒ Object
Returns the value of attribute coverage.
-
#entry_status ⇒ Object
Returns the value of attribute entry_status.
-
#entry_uid ⇒ Object
Returns the value of attribute entry_uid.
-
#id ⇒ Object
Returns the value of attribute id.
-
#isbn ⇒ Object
Returns the value of attribute isbn.
-
#oclcnum ⇒ Object
Returns the value of attribute oclcnum.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#provider_uid ⇒ Object
Returns the value of attribute provider_uid.
-
#publisher ⇒ Object
Returns the value of attribute publisher.
-
#title ⇒ Object
Returns the value of attribute title.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize ⇒ Entry
constructor
A new instance of Entry.
- #load(item) ⇒ Object
Constructor Details
#initialize ⇒ Entry
Returns a new instance of Entry.
6 7 |
# File 'lib/wckbapi/entry.rb', line 6 def initialize() end |
Instance Attribute Details
#author ⇒ Object
Returns the value of attribute author.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def @author end |
#bkey ⇒ Object
Returns the value of attribute bkey.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def bkey @bkey end |
#collection_name ⇒ Object
Returns the value of attribute collection_name.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def collection_name @collection_name end |
#collection_uid ⇒ Object
Returns the value of attribute collection_uid.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def collection_uid @collection_uid end |
#coverage ⇒ Object
Returns the value of attribute coverage.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def coverage @coverage end |
#entry_status ⇒ Object
Returns the value of attribute entry_status.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def entry_status @entry_status end |
#entry_uid ⇒ Object
Returns the value of attribute entry_uid.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def entry_uid @entry_uid end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def id @id end |
#isbn ⇒ Object
Returns the value of attribute isbn.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def isbn @isbn end |
#oclcnum ⇒ Object
Returns the value of attribute oclcnum.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def oclcnum @oclcnum end |
#provider_name ⇒ Object
Returns the value of attribute provider_name.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def provider_name @provider_name end |
#provider_uid ⇒ Object
Returns the value of attribute provider_uid.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def provider_uid @provider_uid end |
#publisher ⇒ Object
Returns the value of attribute publisher.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def publisher @publisher end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def title @title end |
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/wckbapi/entry.rb', line 4 def uri @uri end |
Instance Method Details
#load(item) ⇒ Object
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/wckbapi/entry.rb', line 8 def load(item) @id = item['id'] @title = item['title'] @entry_uid = item['entry_uid'] @entry_status = item['entry_status'] @bkey = item['bkey'] @collection_name = item['kb:collection_name'] @collection_uid = item['kb:collection_uid'] @provider_uid = item['kb:provider_uid'] @provider_name = item['kb:provider_name'] @oclcnum = item['kb:oclcnum'] @author = item['kb:author'] @isbn = item['kb:isbn'] @publisher = item['kb:publisher'] @coverage = item['kb:coverage'] item['links'].each {|t| if t['rel'] == 'via' @uri = t['href'] end } end |