Method: Consist::Step#perform

Defined in:
lib/consist/step.rb

#perform(executor) ⇒ Object



58
59
60
61
62
63
64
65
66
67
# File 'lib/consist/step.rb', line 58

def perform(executor)
  @commands.each do |command|
    banner(command[:message]) unless command[:message].empty?

    execable = Object.const_get("Consist::Commands::#{command[:type].capitalize}").new(command)
    executor.as @required_user do
      execable.perform!(executor)
    end
  end
end