Module: Decommas

Defined in:
lib/decommas.rb,
lib/decommas/api.rb,
lib/decommas/base.rb,
lib/decommas/errors.rb,
lib/decommas/response/api.rb,
lib/decommas/configuration.rb,
lib/decommas/price_service.rb,
lib/decommas/response/base.rb,
lib/decommas/response/price_service.rb

Defined Under Namespace

Modules: Response Classes: Api, Base, Configuration, PriceService, ResponseError, ThrottledResponseError, TokenNotProvidedError

Class Method Summary collapse

Class Method Details

.configurationObject

Instantiate the Configuration singleton or return it. Remember that the instance has attribute readers so that we can access the configured values



18
19
20
# File 'lib/decommas.rb', line 18

def configuration
  @configuration ||= Configuration.new
end

.configure {|configuration| ... } ⇒ Object

This is the configure block definition. The configuration method will return the Configuration singleton, which is then yielded to the configure block. Then it’s just a matter of using the attribute accessors we previously defined

Yields:



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

def configure
  yield(configuration)
end