Class: Alma::BibSet
- Inherits:
-
Object
- Object
- Alma::BibSet
- Extended by:
- Forwardable
- Includes:
- Enumerable
- Defined in:
- lib/alma/bib_set.rb
Instance Attribute Summary collapse
-
#response ⇒ Object
readonly
include Alma::Error.
Instance Method Summary collapse
-
#initialize(response_body_hash) ⇒ BibSet
constructor
A new instance of BibSet.
- #key ⇒ Object
- #list ⇒ Object
- #total_record_count ⇒ Object
Constructor Details
#initialize(response_body_hash) ⇒ BibSet
Returns a new instance of BibSet.
12 13 14 |
# File 'lib/alma/bib_set.rb', line 12 def initialize(response_body_hash) @response = response_body_hash end |
Instance Attribute Details
#response ⇒ Object (readonly)
include Alma::Error
8 9 10 |
# File 'lib/alma/bib_set.rb', line 8 def response @response end |
Instance Method Details
#key ⇒ Object
22 23 24 |
# File 'lib/alma/bib_set.rb', line 22 def key 'bib' end |
#list ⇒ Object
16 17 18 19 20 |
# File 'lib/alma/bib_set.rb', line 16 def list @list ||= response.fetch(key, []).map do |record| Alma::Bib.new(record) end end |
#total_record_count ⇒ Object
26 27 28 |
# File 'lib/alma/bib_set.rb', line 26 def total_record_count size end |