Class: Voyager::Collection

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

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#holdingsObject (readonly)

Returns the value of attribute holdings.



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

def holdings
  @holdings
end

#holdings_statusObject (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