Class: Voyager::Collection
- Inherits:
-
Object
- Object
- Voyager::Collection
- Defined in:
- lib/collection.rb
Instance Attribute Summary collapse
-
#holdings ⇒ Object
readonly
Returns the value of attribute holdings.
-
#holdings_status ⇒ Object
readonly
Returns the value of attribute holdings_status.
Instance Method Summary collapse
-
#initialize(args = {}) ⇒ Collection
constructor
A new instance of Collection.
- #to_hash(args = {}) ⇒ Object
Constructor Details
#initialize(args = {}) ⇒ Collection
Returns a new instance of Collection.
5 6 7 8 9 10 11 12 |
# File 'lib/collection.rb', line 5 def initialize(args = {}) @connection = args[:connection] || raise("Must pass a connection") @bibid = args[:bibid] || raise("Must pass a bibid") @bibid = @bibid.to_s parse_results end |
Instance Attribute Details
#holdings ⇒ Object (readonly)
Returns the value of attribute holdings.
3 4 5 |
# File 'lib/collection.rb', line 3 def holdings @holdings end |
#holdings_status ⇒ Object (readonly)
Returns the value of attribute holdings_status.
3 4 5 |
# File 'lib/collection.rb', line 3 def holdings_status @holdings_status end |
Instance Method Details
#to_hash(args = {}) ⇒ Object
14 15 16 17 18 |
# File 'lib/collection.rb', line 14 def to_hash(args = {}) { statuses: @holdings_status.to_hash(args) } end |