lib/alma/user_set.rb in alma-0.2.1 vs lib/alma/user_set.rb in alma-0.2.3
- old
+ new
@@ -1,29 +1,18 @@
module Alma
class UserSet
- attr_reader :total_record_count, :list
+ def top_level_key
+ 'users'
- def initialize(ws_response)
- @ws_response = ws_response
end
- def total_record_count
- @ws_response['users'].fetch('total_record_count', 0)
+ def response_records_key
+ 'user'
end
- def list
- @list ||= list_results
+ def single_record_class
+ Alma::User
end
- private
- def response_records
- @ws_response['users'].fetch('user',[])
- end
-
- def list_results
- response_records.map do |fee|
- Alma::AlmaRecord.new(fee)
- end
- end
end
end
\ No newline at end of file