Module: EchoNest

Defined in:
lib/another_echonest_ruby_api.rb,
lib/another_echonest_ruby_api/query.rb,
lib/another_echonest_ruby_api/config.rb,
lib/another_echonest_ruby_api/request.rb,
lib/another_echonest_ruby_api/response.rb

Defined Under Namespace

Classes: Config, ConfigException, Query, Request, RequestException, Response

Class Method Summary collapse

Class Method Details

.configObject



18
19
20
21
22
23
24
# File 'lib/another_echonest_ruby_api.rb', line 18

def self.config
  if @config
    @config
  else
    raise ConfigException, ConfigException::EXCEPTION_TEXT
  end
end

.setup {|@config| ... } ⇒ Object

Yields:



26
27
28
29
# File 'lib/another_echonest_ruby_api.rb', line 26

def self.setup(&block)
  @config = Config.new
  yield @config
end