Class: LSL::CommandExecution::Single

Inherits:
Base show all
Defined in:
lib/lsl/command/execution.rb

Instance Attribute Summary collapse

Attributes inherited from Base

#command_str, #shell

Instance Method Summary collapse

Instance Attribute Details

#commandObject

Returns the value of attribute command.



44
45
46
# File 'lib/lsl/command/execution.rb', line 44

def command
  @command
end

#input_argsObject

Returns the value of attribute input_args.



44
45
46
# File 'lib/lsl/command/execution.rb', line 44

def input_args
  @input_args
end

Instance Method Details

#my_eval(str, ops) ⇒ Object



53
54
55
56
57
# File 'lib/lsl/command/execution.rb', line 53

def my_eval(str,ops)
  OpenStruct.new(ops).instance_eval(str)
rescue => exp
  puts "failed #{exp.message}"
end

#run!Object



79
80
81
82
83
# File 'lib/lsl/command/execution.rb', line 79

def run!
  result
rescue => exp
  puts "command failed #{exp.message}"
end