Sha256: 4f6566572ffc1f08c75be1cbedb8a4a3c59d6a6b4473d992f659c223f0a4a2ca

Contents?: true

Size: 372 Bytes

Versions: 8

Compression:

Stored size: 372 Bytes

Contents

# frozen_string_literal: true

module Alma
  class LibrarySet < ResultSet
    def_delegators :results, :[], :empty?

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

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

    protected
      def key
        "library"
      end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
alma-0.6.2 lib/alma/library_set.rb
alma-0.6.1 lib/alma/library_set.rb
alma-0.6.0 lib/alma/library_set.rb
alma-0.5.1 lib/alma/library_set.rb
alma-0.5.0 lib/alma/library_set.rb
alma-0.4.2 lib/alma/library_set.rb
alma-0.4.1 lib/alma/library_set.rb
alma-0.4.0 lib/alma/library_set.rb