Class: WhenIWork::Configuration
- Inherits:
-
Object
- Object
- WhenIWork::Configuration
- Defined in:
- lib/wheniwork/configuration.rb
Instance Attribute Summary collapse
-
#api_key ⇒ Object
Returns the value of attribute api_key.
-
#api_version ⇒ Object
Returns the value of attribute api_version.
-
#cache_enabled ⇒ Object
Returns the value of attribute cache_enabled.
-
#cache_store ⇒ Object
Returns the value of attribute cache_store.
-
#endpoint ⇒ Object
Returns the value of attribute endpoint.
-
#expires_in ⇒ Object
Returns the value of attribute expires_in.
-
#password ⇒ Object
Returns the value of attribute password.
-
#protocol ⇒ Object
Returns the value of attribute protocol.
-
#username ⇒ Object
Returns the value of attribute username.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #setup_base ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
6 7 8 |
# File 'lib/wheniwork/configuration.rb', line 6 def initialize setup_base end |
Instance Attribute Details
#api_key ⇒ Object
Returns the value of attribute api_key.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def api_key @api_key end |
#api_version ⇒ Object
Returns the value of attribute api_version.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def api_version @api_version end |
#cache_enabled ⇒ Object
Returns the value of attribute cache_enabled.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def cache_enabled @cache_enabled end |
#cache_store ⇒ Object
Returns the value of attribute cache_store.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def cache_store @cache_store end |
#endpoint ⇒ Object
Returns the value of attribute endpoint.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def endpoint @endpoint end |
#expires_in ⇒ Object
Returns the value of attribute expires_in.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def expires_in @expires_in end |
#password ⇒ Object
Returns the value of attribute password.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def password @password end |
#protocol ⇒ Object
Returns the value of attribute protocol.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def protocol @protocol end |
#username ⇒ Object
Returns the value of attribute username.
3 4 5 |
# File 'lib/wheniwork/configuration.rb', line 3 def username @username end |
Instance Method Details
#setup_base ⇒ Object
10 11 12 13 14 15 16 17 |
# File 'lib/wheniwork/configuration.rb', line 10 def setup_base self.api_version = '2' self.protocol = 'https' self.cache_enabled = true self.cache_store = ActiveSupport::Cache::MemoryStore.new self.endpoint = "#{protocol}://api.wheniwork.com/#{api_version}/" self.expires_in = 60 end |