Class: Omdb::Api::Client

Inherits:
Object
  • Object
show all
Includes:
PublicApi
Defined in:
lib/omdb/api/client.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from PublicApi::Search

#search

Methods included from PublicApi::FindBy

#find_by_id, #find_by_title

Methods included from Utils

#_handle_response, #_response_handler, #perform_get, #perform_request

Constructor Details

#initialize(options = {}) {|@configuration| ... } ⇒ Client

Returns a new instance of Client.

Yields:



12
13
14
15
16
17
18
# File 'lib/omdb/api/client.rb', line 12

def initialize(options = {})
  @configuration = Configuration.new

  options.each { |k, v| @configuration.__send__("#{k}=", v) }

  yield(@configuration) if block_given?
end

Instance Attribute Details

#configurationObject (readonly)

Returns the value of attribute configuration.



10
11
12
# File 'lib/omdb/api/client.rb', line 10

def configuration
  @configuration
end