Class: Redcar::Runnables::AppendParamsAndRunCommand

Inherits:
Command show all
Defined in:
plugins/runnables/lib/runnables/commands.rb

Constant Summary

Constants included from Observable

Observable::ASPECTS

Instance Attribute Summary

Attributes inherited from Command

#error

Instance Method Summary (collapse)

Methods inherited from Command

active_changed, #environment, inherited, #inspect, norecord, record?, #run

Methods included from Sensitive

#active?, #sensitivities, #sensitivity_names, #sensitize

Methods included from Observable

#add_listener, #notify_listeners, #remove_listener

Constructor Details

- (AppendParamsAndRunCommand) initialize(node)

A new instance of AppendParamsAndRunCommand



5
6
7
# File 'plugins/runnables/lib/runnables/commands.rb', line 5

def initialize(node)
  @node = node
end

Instance Method Details

- (Object) execute



9
10
11
12
13
# File 'plugins/runnables/lib/runnables/commands.rb', line 9

def execute
  command = @node.command
  command = "#{command} #{PARAMS}" unless command =~ /#{PARAMS}$/
  Runnables.run_process(@node.path, command, @node.text, @node.output)
end