module EStat::Configuration

Constants

DEFAULT_ADAPTER
DEFAULT_APP_ID
DEFAULT_BASE_URL
DEFAULT_FORMAT
DEFAULT_LANG

J or E. defulat ā€˜J’

DEFAULT_VERSION
OPTIONS_KEYS

Public Class Methods

extended(base) click to toggle source
# File lib/e-stat/configuration.rb, line 22
def self.extended(base)
  base.reset
end

Public Instance Methods

configure() { |self| ... } click to toggle source
# File lib/e-stat/configuration.rb, line 26
def configure
  yield self
end
options() click to toggle source
# File lib/e-stat/configuration.rb, line 30
def options
  OPTIONS_KEYS.inject({}) do |option, key|
    option.merge!(key => send(key))
  end
end
reset() click to toggle source
# File lib/e-stat/configuration.rb, line 36
def reset
  self.app_id = DEFAULT_APP_ID
  self.lang = DEFAULT_LANG
  self.version = DEFAULT_VERSION
  self.format = DEFAULT_FORMAT
  self.base_url = "#{DEFAULT_BASE_URL}#{DEFAULT_VERSION}/app"
  self.adapter = DEFAULT_ADAPTER
end