Class: Heroku::Runner
- Inherits:
-
Object
- Object
- Heroku::Runner
- Defined in:
- lib/heroku/runner.rb
Instance Attribute Summary collapse
-
#app ⇒ Object
Returns the value of attribute app.
-
#command ⇒ Object
Returns the value of attribute command.
-
#logger ⇒ Object
Returns the value of attribute logger.
-
#pid ⇒ Object
readonly
Returns the value of attribute pid.
-
#running ⇒ Object
readonly
Returns the value of attribute running.
-
#size ⇒ Object
Returns the value of attribute size.
-
#tail ⇒ Object
readonly
Returns the value of attribute tail.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Runner
constructor
A new instance of Runner.
- #run!(options = {}, &block) ⇒ Object
- #running? ⇒ Boolean
Constructor Details
#initialize(options = {}) ⇒ Runner
Returns a new instance of Runner.
7 8 9 10 11 12 13 |
# File 'lib/heroku/runner.rb', line 7 def initialize( = {}) @app = [:app] @logger = [:logger] @command = [:command] @size = [:size] raise Heroku::Commander::Errors::MissingCommandError unless @command end |
Instance Attribute Details
#app ⇒ Object
Returns the value of attribute app.
4 5 6 |
# File 'lib/heroku/runner.rb', line 4 def app @app end |
#command ⇒ Object
Returns the value of attribute command.
4 5 6 |
# File 'lib/heroku/runner.rb', line 4 def command @command end |
#logger ⇒ Object
Returns the value of attribute logger.
4 5 6 |
# File 'lib/heroku/runner.rb', line 4 def logger @logger end |
#pid ⇒ Object (readonly)
Returns the value of attribute pid.
5 6 7 |
# File 'lib/heroku/runner.rb', line 5 def pid @pid end |
#running ⇒ Object (readonly)
Returns the value of attribute running.
5 6 7 |
# File 'lib/heroku/runner.rb', line 5 def running @running end |
#size ⇒ Object
Returns the value of attribute size.
4 5 6 |
# File 'lib/heroku/runner.rb', line 4 def size @size end |
#tail ⇒ Object (readonly)
Returns the value of attribute tail.
5 6 7 |
# File 'lib/heroku/runner.rb', line 5 def tail @tail end |
Instance Method Details
#run!(options = {}, &block) ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/heroku/runner.rb', line 19 def run!( = {}, &block) if && [:detached] run_detached! , &block else run_attached! , &block end end |
#running? ⇒ Boolean
15 16 17 |
# File 'lib/heroku/runner.rb', line 15 def running? !! @running end |