Class: Tr3llo::Configuration
- Inherits:
-
Object
- Object
- Tr3llo::Configuration
- Defined in:
- lib/3llo/configuration.rb
Instance Method Summary collapse
- #api_key ⇒ Object
- #api_key=(value) ⇒ Object
- #api_token ⇒ Object
- #api_token=(token) ⇒ Object
- #finalize! ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #user_id ⇒ Object
- #user_id=(value) ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
3 4 5 |
# File 'lib/3llo/configuration.rb', line 3 def initialize @container = Container.new end |
Instance Method Details
#api_key ⇒ Object
19 20 21 |
# File 'lib/3llo/configuration.rb', line 19 def api_key container.resolve(:api_key) end |
#api_key=(value) ⇒ Object
15 16 17 |
# File 'lib/3llo/configuration.rb', line 15 def api_key=(value) container.register(:api_key, value) end |
#api_token ⇒ Object
27 28 29 |
# File 'lib/3llo/configuration.rb', line 27 def api_token container.resolve(:api_token) end |
#api_token=(token) ⇒ Object
23 24 25 |
# File 'lib/3llo/configuration.rb', line 23 def api_token=(token) container.register(:api_token, token) end |
#finalize! ⇒ Object
31 32 33 |
# File 'lib/3llo/configuration.rb', line 31 def finalize! container.freeze end |
#user_id ⇒ Object
11 12 13 |
# File 'lib/3llo/configuration.rb', line 11 def user_id container.resolve(:user_id) end |
#user_id=(value) ⇒ Object
7 8 9 |
# File 'lib/3llo/configuration.rb', line 7 def user_id=(value) container.register(:user_id, value) end |