Class: WCKBAPI::Collection
- Inherits:
-
Object
- Object
- WCKBAPI::Collection
- Defined in:
- lib/wckbapi/collection.rb
Instance Attribute Summary collapse
-
#avaiable_entries ⇒ Object
Returns the value of attribute avaiable_entries.
-
#collection_name ⇒ Object
Returns the value of attribute collection_name.
-
#collection_type ⇒ Object
Returns the value of attribute collection_type.
-
#collection_uid ⇒ Object
Returns the value of attribute collection_uid.
-
#dbkey ⇒ Object
Returns the value of attribute dbkey.
-
#id ⇒ Object
Returns the value of attribute id.
-
#open ⇒ Object
Returns the value of attribute open.
-
#owner_institution ⇒ Object
Returns the value of attribute owner_institution.
-
#provider_name ⇒ Object
Returns the value of attribute provider_name.
-
#provider_uid ⇒ Object
Returns the value of attribute provider_uid.
-
#selected_entries ⇒ Object
Returns the value of attribute selected_entries.
-
#source ⇒ Object
Returns the value of attribute source.
-
#source_institution ⇒ Object
Returns the value of attribute source_institution.
-
#status ⇒ Object
Returns the value of attribute status.
-
#title ⇒ Object
Returns the value of attribute title.
-
#uri ⇒ Object
Returns the value of attribute uri.
Instance Method Summary collapse
-
#initialize ⇒ Collection
constructor
A new instance of Collection.
- #load(item) ⇒ Object
Constructor Details
#initialize ⇒ Collection
Returns a new instance of Collection.
6 7 |
# File 'lib/wckbapi/collection.rb', line 6 def initialize() end |
Instance Attribute Details
#avaiable_entries ⇒ Object
Returns the value of attribute avaiable_entries.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def avaiable_entries @avaiable_entries end |
#collection_name ⇒ Object
Returns the value of attribute collection_name.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def collection_name @collection_name end |
#collection_type ⇒ Object
Returns the value of attribute collection_type.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def collection_type @collection_type end |
#collection_uid ⇒ Object
Returns the value of attribute collection_uid.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def collection_uid @collection_uid end |
#dbkey ⇒ Object
Returns the value of attribute dbkey.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def dbkey @dbkey end |
#id ⇒ Object
Returns the value of attribute id.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def id @id end |
#open ⇒ Object
Returns the value of attribute open.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def open @open end |
#owner_institution ⇒ Object
Returns the value of attribute owner_institution.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def owner_institution @owner_institution end |
#provider_name ⇒ Object
Returns the value of attribute provider_name.
4 5 6 |
# File 'lib/wckbapi/collection.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/collection.rb', line 4 def provider_uid @provider_uid end |
#selected_entries ⇒ Object
Returns the value of attribute selected_entries.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def selected_entries @selected_entries end |
#source ⇒ Object
Returns the value of attribute source.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def source @source end |
#source_institution ⇒ Object
Returns the value of attribute source_institution.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def source_institution @source_institution end |
#status ⇒ Object
Returns the value of attribute status.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def status @status end |
#title ⇒ Object
Returns the value of attribute title.
4 5 6 |
# File 'lib/wckbapi/collection.rb', line 4 def title @title end |
#uri ⇒ Object
Returns the value of attribute uri.
4 5 6 |
# File 'lib/wckbapi/collection.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 29 30 31 |
# File 'lib/wckbapi/collection.rb', line 8 def load(item) @id = item['id'] @title = item['title'] @provider_uid = item['kb:provider_uid'] @provider_name = item['kb:provider_name'] @available_entries = item['kb:available_entries'] @selected_entries = item['kb:selected_entries'] @collection_name = item['kb:collection_name'] @collection_uid = item['kb:collection_uid'] @owner_institution = item['kb:owner_institution'] @source_institution = item['kb:source_institution'] @status = item['kb:status'] @dbkey = item['kb:dbkey'] @source = item['kb:source'] @open = item['kb:open'] @collection_type = item['kb:collection_type'] item['links'].each {|t| if t['rel'] == 'via' @uri = t['href'] break end } end |