Module: Oodler

Defined in:
lib/oodler.rb,
lib/oodler/image.rb,
lib/oodler/client.rb,
lib/oodler/region.rb,
lib/oodler/source.rb,
lib/oodler/element.rb,
lib/oodler/category.rb,
lib/oodler/location.rb,
lib/oodler/refinement.rb,
lib/oodler/web_client.rb,
lib/oodler/refinements.rb,
lib/oodler/oodle_response.rb,
lib/oodler/refinement_value.rb

Defined Under Namespace

Classes: Category, Client, Element, Image, Location, OodleArgumentError, OodleResponse, OodlerError, Refinement, RefinementValue, Refinements, Region, Source, WebClient

Class Method Summary collapse

Class Method Details

.configure {|_self| ... } ⇒ Object

config/initializers/oodler.rb (for instance)

Oodler.configure do |config|

config.key = 'api_key'

end

elsewhere

client = Oodler::Client.new

Yields:

  • (_self)

Yield Parameters:

  • _self (Oodler)

    the object that the method was called on



38
39
40
41
42
43
# File 'lib/oodler.rb', line 38

def self.configure
  yield self
    
  Oodler.key = key
  true
end

.keyObject



45
46
47
# File 'lib/oodler.rb', line 45

def self.key
  @key
end

.key=(key) ⇒ Object



49
50
51
# File 'lib/oodler.rb', line 49

def self.key=(key)
  @key = key
end