Class: EY::Serverside::Slug::Restarter

Inherits:
Object
  • Object
show all
Includes:
Railway, Runner
Defined in:
lib/engineyard-serverside/slug/restarter.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Runner

#run, #run_and_output, #run_and_success?, #runner

Methods included from Railway

#call, included

Methods included from Result::DSL

#Failure, #Success

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

#configObject (readonly)

Returns the value of attribute config


15
16
17
# File 'lib/engineyard-serverside/slug/restarter.rb', line 15

def config
  @config
end

#serversObject (readonly)

Returns the value of attribute servers


15
16
17
# File 'lib/engineyard-serverside/slug/restarter.rb', line 15

def servers
  @servers
end

#shellObject (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