class OmdbGateway::CollectionResponse

Attributes

response[R]
result[R]
total_results[R]

Public Class Methods

new(response_hash) click to toggle source
# File lib/omdb_gateway/collection_response.rb, line 6
def initialize(response_hash)
  @result = []
  response_hash['Search'].collect { |hash| @result << Response.new(hash) } if response_hash['Search'].present?
  @total_results = response_hash['totalResults']
  @response = response_hash['Response']
end