module GaExampleGem::Configuration

This is the configuration module that allows us to setup an api_key using a pattern close to the Twitter or MtGox gem

Attributes

api_key[RW]

This is our API key. We aren’t really using it anywhere, but you could imagine using it with HTTP requests This is tricky, this adds these attr_accessors to the CLASS

oauth_key[RW]

This is our API key. We aren’t really using it anywhere, but you could imagine using it with HTTP requests This is tricky, this adds these attr_accessors to the CLASS

Public Instance Methods

configure() { |self| ... } click to toggle source

This yields a block that can be iterated on Its useful for being able to set values to the attr_accessor

# File lib/ga_example_gem/configuration.rb, line 17
def configure
  yield self
end
reset() click to toggle source

This reset our API key and is called when the client is initialized

# File lib/ga_example_gem/configuration.rb, line 23
def reset
  self.api_key = nil
  self
end