Class: Alma::ResultSet
- Inherits:
-
Object
- Object
- Alma::ResultSet
- Defined in:
- lib/alma/result_set.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(ws_response) ⇒ ResultSet
constructor
A new instance of ResultSet.
- #list ⇒ Object
- #total_record_count ⇒ Object
Constructor Details
#initialize(ws_response) ⇒ ResultSet
Returns a new instance of ResultSet.
4 5 6 |
# File 'lib/alma/result_set.rb', line 4 def initialize(ws_response) @ws_response = ws_response end |
Instance Method Details
#list ⇒ Object
13 14 15 |
# File 'lib/alma/result_set.rb', line 13 def list @list ||= list_results end |
#total_record_count ⇒ Object
9 10 11 |
# File 'lib/alma/result_set.rb', line 9 def total_record_count @ws_response[top_level_key].fetch('total_record_count', 0).to_i end |