Class: Alma::ResultSet
- Inherits:
-
Object
show all
- Extended by:
- Forwardable
- Includes:
- Error, Enumerable
- Defined in:
- lib/alma/result_set.rb
Instance Method Summary
collapse
Methods included from Error
#error, #error_message, #has_error?
Constructor Details
#initialize(ws_response) ⇒ ResultSet
Returns a new instance of ResultSet.
10
11
12
|
# File 'lib/alma/result_set.rb', line 10
def initialize(ws_response)
@response = ws_response
end
|
Instance Method Details
#list ⇒ Object
18
19
20
|
# File 'lib/alma/result_set.rb', line 18
def list
@list ||= list_results
end
|
#response_records_key ⇒ Object
27
28
29
|
# File 'lib/alma/result_set.rb', line 27
def response_records_key
raise NotImplementedError 'Subclasses of ResultSet Need to define the key for response records'
end
|
#top_level_key ⇒ Object
23
24
25
|
# File 'lib/alma/result_set.rb', line 23
def top_level_key
raise NotImplementedError 'Subclasses of ResultSet Need to define the top level key'
end
|
#total_record_count ⇒ Object
14
15
16
|
# File 'lib/alma/result_set.rb', line 14
def total_record_count
@response[top_level_key].fetch('total_record_count', 0).to_i
end
|