Module: TRex

Defined in:
lib/t_rex/util/configure.rb,
lib/t_rex.rb,
lib/t_rex/request.rb,
lib/t_rex/exceptions.rb,
lib/t_rex/metasaurus.rb,
lib/t_rex/util/version.rb,
lib/t_rex/util/params_hash.rb

Overview

Defined Under Namespace

Classes: Config, Metasaurus, ParamsHash, Request

Constant Summary collapse

ACCEPTABLE_KEYS =
[
  :application,
  :city,
  :endpoint,
  :geoname,
  :lat,
  :lng,
  :neighborhood,
  :rectype,
  :state,
  :zip,
]
TRexBadEndpointError =
Class.new(StandardError)
TRexConfigurationError =
Class.new(StandardError)
VERSION =
'0.1.2'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.configurationObject

Returns the value of attribute configuration.



7
8
9
# File 'lib/t_rex/util/configure.rb', line 7

def configuration
  @configuration
end

Class Method Details

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

Yields:



10
11
12
13
14
# File 'lib/t_rex/util/configure.rb', line 10

def self.configure
  self.configuration ||= Config.new
  yield configuration
  configuration
end