Class: Puzzle::Configuration
- Inherits:
-
Object
- Object
- Puzzle::Configuration
- Defined in:
- lib/puzzle/configuration.rb
Overview
Class used to store configuration information
Instance Attribute Summary collapse
-
#format ⇒ String
The return format (XML/JSON).
-
#host ⇒ String
The host to connect to (defaults to
api.openbeerdatabase.com). -
#port ⇒ Integer
The port used to communicate.
-
#token ⇒ String
The API token for your user.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
Instantiated from configuration.
Constructor Details
#initialize ⇒ Configuration
Instantiated from Puzzle.configuration. Sets defaults.
17 18 19 20 21 |
# File 'lib/puzzle/configuration.rb', line 17 def initialize self.host = "www.jigsaw.com" self.port = 443 self.format = "json" end |
Instance Attribute Details
#format ⇒ String
Returns The return format (XML/JSON).
11 12 13 |
# File 'lib/puzzle/configuration.rb', line 11 def format @format end |
#host ⇒ String
Returns The host to connect to (defaults to api.openbeerdatabase.com).
5 6 7 |
# File 'lib/puzzle/configuration.rb', line 5 def host @host end |
#port ⇒ Integer
Returns The port used to communicate.
8 9 10 |
# File 'lib/puzzle/configuration.rb', line 8 def port @port end |
#token ⇒ String
Returns The API token for your user.
14 15 16 |
# File 'lib/puzzle/configuration.rb', line 14 def token @token end |