Sha256: 192bf7c8400100c2e9c27f8adf39cb38e1493a717aa20f976ad3f0e5b70269bc
Contents?: true
Size: 423 Bytes
Versions: 2
Compression:
Stored size: 423 Bytes
Contents
class MovieCollectionResponse attr_accessor :results, :page, :total_pages, :total_results def initialize self.results = [MovieCollectionResourceResponse.new] self.page = 1 self.total_pages = 1 self.total_results = results.size end def to_json { page: page, results: results.map(&:to_hash), total_pages: total_pages, total_results: total_results }.to_json end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
enceladus-0.0.3 | spec/support/responses/movie_collection_response.rb |
enceladus-0.0.2 | spec/support/responses/movie_collection_response.rb |