Class: Redminerb::Config
- Inherits:
-
Object
- Object
- Redminerb::Config
- Defined in:
- lib/redminerb/config.rb
Overview
Read user’s config from ~/.redminerb.yml
Instance Method Summary collapse
- #api_key ⇒ Object
-
#initialize ⇒ Config
constructor
A new instance of Config.
- #url ⇒ Object
Constructor Details
#initialize ⇒ Config
Returns a new instance of Config.
7 8 9 |
# File 'lib/redminerb/config.rb', line 7 def initialize ENV['REDMINERB_URL'] ? _from_env : _from_yml end |
Instance Method Details
#api_key ⇒ Object
16 17 18 19 |
# File 'lib/redminerb/config.rb', line 16 def api_key Redminerb.init_required! @api_key end |
#url ⇒ Object
11 12 13 14 |
# File 'lib/redminerb/config.rb', line 11 def url Redminerb.init_required! @url end |