Class: Alma::LibrarySet

Inherits:
ResultSet show all
Defined in:
lib/alma/library_set.rb

Instance Attribute Summary

Attributes inherited from ResultSet

#response

Instance Method Summary collapse

Methods inherited from ResultSet

#initialize, #loggable, #total_record_count

Methods included from Error

#error, #error_message, #has_error?

Constructor Details

This class inherits a constructor from Alma::ResultSet

Instance Method Details

#each(&block) ⇒ Object



7
8
9
# File 'lib/alma/library_set.rb', line 7

def each(&block)
  results.each(&block)
end

#resultsObject



11
12
13
14
# File 'lib/alma/library_set.rb', line 11

def results
  @results ||= (@response.fetch(key, []) || [])
     .map { |item| single_record_class.new(item) }
end