Class: EY::Serverside::Slug::Distributor

Inherits:
Object
  • Object
show all
Includes:
Railway, Runner
Defined in:
lib/engineyard-serverside/slug/distributor.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) ⇒ Distributor

Returns a new instance of Distributor.



20
21
22
23
24
# File 'lib/engineyard-serverside/slug/distributor.rb', line 20

def initialize(config, shell, servers)
  @config = config
  @shell = shell
  @servers = servers
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



18
19
20
# File 'lib/engineyard-serverside/slug/distributor.rb', line 18

def config
  @config
end

#serversObject (readonly)

Returns the value of attribute servers.



18
19
20
# File 'lib/engineyard-serverside/slug/distributor.rb', line 18

def servers
  @servers
end

#shellObject (readonly)

Returns the value of attribute shell.



18
19
20
# File 'lib/engineyard-serverside/slug/distributor.rb', line 18

def shell
  @shell
end

Class Method Details

.distribute(data = {}) ⇒ Object



14
15
16
# File 'lib/engineyard-serverside/slug/distributor.rb', line 14

def self.distribute(data = {})
  new(data[:config], data[:shell], data[:servers]).call(data)
end