lib/alma/bib_set.rb in alma-0.2.8 vs lib/alma/bib_set.rb in alma-0.3.1
- old
+ new
@@ -1,31 +1,17 @@
-module Alma
- class BibSet
+# frozen_string_literal: true
- extend Forwardable
- include Enumerable
- #include Alma::Error
-
- attr_reader :response
- def_delegators :list, :each, :size
- def_delegators :response, :[], :fetch
-
- def initialize(response_body_hash)
- @response = response_body_hash
+module Alma
+ class BibSet < ResultSet
+ def key
+ "bib"
end
- def list
- @list ||= response.fetch(key, []).map do |record|
- Alma::Bib.new(record)
- end
+ def single_record_class
+ Alma::Bib
end
- def key
- 'bib'
- end
-
def total_record_count
size
end
-
end
end