Class: Heroku::Config
- Inherits:
-
Hash
- Object
- Hash
- Heroku::Config
- Defined in:
- lib/heroku/config.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#logger ⇒ Object
Returns the value of attribute logger.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Config
constructor
A new instance of Config.
- #reload! ⇒ Object
Constructor Details
#initialize(options = {}) ⇒ Config
Returns a new instance of Config.
6 7 8 9 |
# File 'lib/heroku/config.rb', line 6 def initialize( = {}) @app = [:app] @logger = [:logger] end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
4 5 6 |
# File 'lib/heroku/config.rb', line 4 def app @app end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/heroku/config.rb', line 4 def logger @logger end |
Instance Method Details
#reload! ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
# File 'lib/heroku/config.rb', line 11 def reload! clear cmd = cmdline Heroku::Executor.run cmd, { :logger => logger } do |line| logger.debug "< #{line}" if logger parts = line.split "=", 2 raise Heroku::Commander::Errors::UnexpectedOutputError.new({ :cmd => cmd, :line => line }) if parts.size != 2 self[parts[0].strip] = parts[1].strip end self end |