Module: Puzzle

Defined in:
lib/puzzle.rb,
lib/puzzle/const.rb,
lib/puzzle/error.rb,
lib/puzzle/company.rb,
lib/puzzle/contact.rb,
lib/puzzle/request.rb,
lib/puzzle/exception.rb,
lib/puzzle/configuration.rb

Defined Under Namespace

Modules: ErrorCode, Exception Classes: Company, Configuration, Contact, Error, Request

Class Method Summary collapse

Class Method Details

.configurationConfiguration

Returns Current configuration.

Returns:



21
22
23
# File 'lib/puzzle.rb', line 21

def self.configuration
  @@configuration ||= Configuration.new
end

.configure {|Configuration| ... } ⇒ Object

Call this method to modify defaults in your initializers.

Puzzle.configure do |configuration|

configuration.host = "www.jigsaw.com"
configuration.token = "mytoken"
configuration.format = "xml"

end

Yields:



16
17
18
# File 'lib/puzzle.rb', line 16

def self.configure
  yield(configuration)
end