Class: Nervion::Configuration
- Inherits:
-
Object
- Object
- Nervion::Configuration
- Defined in:
- lib/nervion/configuration.rb
Constant Summary collapse
- UNCONFIGURED_SETTING =
''
Class Method Summary collapse
- .[](setting) ⇒ Object
- .access_token ⇒ Object
-
.access_token=(access_token) ⇒ Object
Configures the access token.
- .access_token_secret ⇒ Object
-
.access_token_secret=(access_token_secret) ⇒ Object
Configures the access token secret.
- .configured! ⇒ Object
- .configured? ⇒ Boolean
- .consumer_key ⇒ Object
-
.consumer_key=(consumer_key) ⇒ Object
Configures the consumer key.
- .consumer_secret ⇒ Object
-
.consumer_secret=(consumer_secret) ⇒ Object
Configures the consumer secret.
- .fetch(setting) ⇒ Object
Class Method Details
.[](setting) ⇒ Object
58 59 60 |
# File 'lib/nervion/configuration.rb', line 58 def self.[](setting) fetch setting end |
.access_token ⇒ Object
43 44 45 |
# File 'lib/nervion/configuration.rb', line 43 def self.access_token @access_token || UNCONFIGURED_SETTING end |
.access_token=(access_token) ⇒ Object
Configures the access token
39 40 41 |
# File 'lib/nervion/configuration.rb', line 39 def self.access_token=(access_token) @access_token = access_token end |
.access_token_secret ⇒ Object
54 55 56 |
# File 'lib/nervion/configuration.rb', line 54 def self.access_token_secret @access_token_secret || UNCONFIGURED_SETTING end |
.access_token_secret=(access_token_secret) ⇒ Object
Configures the access token secret
50 51 52 |
# File 'lib/nervion/configuration.rb', line 50 def self.access_token_secret=(access_token_secret) @access_token_secret = access_token_secret end |
.configured! ⇒ Object
70 71 72 |
# File 'lib/nervion/configuration.rb', line 70 def self.configured! @configured = true end |
.configured? ⇒ Boolean
66 67 68 |
# File 'lib/nervion/configuration.rb', line 66 def self.configured? @configured end |
.consumer_key ⇒ Object
21 22 23 |
# File 'lib/nervion/configuration.rb', line 21 def self.consumer_key @consumer_key || UNCONFIGURED_SETTING end |
.consumer_key=(consumer_key) ⇒ Object
Configures the consumer key
17 18 19 |
# File 'lib/nervion/configuration.rb', line 17 def self.consumer_key=(consumer_key) @consumer_key = consumer_key end |
.consumer_secret ⇒ Object
32 33 34 |
# File 'lib/nervion/configuration.rb', line 32 def self.consumer_secret @consumer_secret || UNCONFIGURED_SETTING end |
.consumer_secret=(consumer_secret) ⇒ Object
Configures the consumer secret
28 29 30 |
# File 'lib/nervion/configuration.rb', line 28 def self.consumer_secret=(consumer_secret) @consumer_secret = consumer_secret end |
.fetch(setting) ⇒ Object
62 63 64 |
# File 'lib/nervion/configuration.rb', line 62 def self.fetch(setting) send setting.to_sym end |