Class: TrelloFlow::GlobalConfig
- Inherits:
-
Object
- Object
- TrelloFlow::GlobalConfig
- Defined in:
- lib/trello_flow/global_config.rb
Constant Summary collapse
- PATH =
ENV["HOME"] + "/.trello_flow"
Instance Method Summary collapse
-
#initialize(store = nil) ⇒ GlobalConfig
constructor
A new instance of GlobalConfig.
- #key ⇒ Object
- #token ⇒ Object
Constructor Details
#initialize(store = nil) ⇒ GlobalConfig
Returns a new instance of GlobalConfig.
8 9 10 |
# File 'lib/trello_flow/global_config.rb', line 8 def initialize(store = nil) @store = store || ConfigStore.new(PATH) end |
Instance Method Details
#key ⇒ Object
12 13 14 |
# File 'lib/trello_flow/global_config.rb', line 12 def key @_key ||= store[:key] || configure_key end |
#token ⇒ Object
16 17 18 |
# File 'lib/trello_flow/global_config.rb', line 16 def token @_token ||= store[:token] || configure_token end |