Class: CommandFactory

Inherits:
Object
  • Object
show all
Defined in:
lib/factories/command_factory.rb

Instance Method Summary collapse

Constructor Details

#initialize(params) ⇒ CommandFactory

Returns a new instance of CommandFactory.



14
15
16
# File 'lib/factories/command_factory.rb', line 14

def initialize(params)
  @params = params
end

Instance Method Details

#get_commandsObject



18
19
20
21
22
23
24
25
26
# File 'lib/factories/command_factory.rb', line 18

def get_commands
  if @params.action == ACTION_BUILD
    [get_build]
  elsif @params.action == ACTION_CEDAR
    get_cedar
  elsif @params.action == ACTION_CALABASH
    get_calabash
  end
end