Class: EY::Serverside::Slug::Restarter
- Inherits:
-
Object
- Object
- EY::Serverside::Slug::Restarter
- Defined in:
- lib/engineyard-serverside/slug/restarter.rb
Instance Attribute Summary collapse
-
#config ⇒ Object
readonly
Returns the value of attribute config.
-
#servers ⇒ Object
readonly
Returns the value of attribute servers.
-
#shell ⇒ Object
readonly
Returns the value of attribute shell.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(config, shell, servers) ⇒ Restarter
constructor
A new instance of Restarter.
Methods included from Runner
#run, #run_and_output, #run_and_success?, #runner
Methods included from Railway
Methods included from Result::DSL
Constructor Details
#initialize(config, shell, servers) ⇒ Restarter
Returns a new instance of Restarter.
21 22 23 24 25 |
# File 'lib/engineyard-serverside/slug/restarter.rb', line 21 def initialize(config, shell, servers) @config = config @shell = shell @servers = servers end |
Instance Attribute Details
#config ⇒ Object (readonly)
Returns the value of attribute config.
15 16 17 |
# File 'lib/engineyard-serverside/slug/restarter.rb', line 15 def config @config end |
#servers ⇒ Object (readonly)
Returns the value of attribute servers.
15 16 17 |
# File 'lib/engineyard-serverside/slug/restarter.rb', line 15 def servers @servers end |
#shell ⇒ Object (readonly)
Returns the value of attribute shell.
15 16 17 |
# File 'lib/engineyard-serverside/slug/restarter.rb', line 15 def shell @shell end |
Class Method Details
.restart(data = {}) ⇒ Object
17 18 19 |
# File 'lib/engineyard-serverside/slug/restarter.rb', line 17 def self.restart(data = {}) new(data[:config], data[:shell], data[:servers]).call(data) end |