Class: Odesk::Api::Config
- Inherits:
-
Object
- Object
- Odesk::Api::Config
- Defined in:
- lib/odesk/api/config.rb
Overview
Config storage
Constant Summary collapse
- @@debug =
false
Instance Attribute Summary collapse
-
#access_secret ⇒ Object
Returns the value of attribute access_secret.
-
#access_token ⇒ Object
Returns the value of attribute access_token.
-
#consumer_key ⇒ Object
readonly
Returns the value of attribute consumer_key.
-
#consumer_secret ⇒ Object
readonly
Returns the value of attribute consumer_secret.
-
#signature_method ⇒ Object
readonly
Returns the value of attribute signature_method.
Instance Method Summary collapse
-
#debug ⇒ Object
Get debug status.
-
#initialize(config = {}) ⇒ Config
constructor
Init config object.
Constructor Details
#initialize(config = {}) ⇒ Config
Init config object
Arguments:
config: (Hash)
27 28 29 30 31 32 33 34 |
# File 'lib/odesk/api/config.rb', line 27 def initialize(config = {}) @consumer_key, @consumer_secret = config['consumer_key'], config['consumer_secret'] @access_token, @access_secret = config['access_token'], config['access_secret'] @signature_method = config['signature_method'] @@debug = config['debug'] $DEBUG = self.debug end |
Instance Attribute Details
#access_secret ⇒ Object
Returns the value of attribute access_secret.
20 21 22 |
# File 'lib/odesk/api/config.rb', line 20 def access_secret @access_secret end |
#access_token ⇒ Object
Returns the value of attribute access_token.
20 21 22 |
# File 'lib/odesk/api/config.rb', line 20 def access_token @access_token end |
#consumer_key ⇒ Object (readonly)
Returns the value of attribute consumer_key.
21 22 23 |
# File 'lib/odesk/api/config.rb', line 21 def consumer_key @consumer_key end |
#consumer_secret ⇒ Object (readonly)
Returns the value of attribute consumer_secret.
21 22 23 |
# File 'lib/odesk/api/config.rb', line 21 def consumer_secret @consumer_secret end |
#signature_method ⇒ Object (readonly)
Returns the value of attribute signature_method.
21 22 23 |
# File 'lib/odesk/api/config.rb', line 21 def signature_method @signature_method end |
Instance Method Details
#debug ⇒ Object
Get debug status
37 38 39 |
# File 'lib/odesk/api/config.rb', line 37 def debug # :nodoc: @@debug end |