Class: Uttk::Strategies::Command

Inherits:
Strategy show all
Includes:
Concrete
Defined in:
lib/uttk/strategies/Command.rb

Overview

I can check many interaction with a command line based program, such as: its standard output, exit status, standard error. I can specify to a given command its arguments, environment variables and standard input.

A tutorial introduces how to use this strategy at uttk.org/shelf/documentation

Instance Attribute Summary collapse

Attributes inherited from Strategy

#status

Instance Method Summary collapse

Methods inherited from Strategy

#abort, #assert_cmd, #assign, #clean_instance_variables, #display_unexpected_exc, #display_unexpected_synflow_exc, #fail, #initialize, #initialize_flow_factory, #mk_system_runner, #name=, #pass, #raise_error, #reject, #run, #running?, #skip, #skip_if_cached, #skip_pass, #skip_wrt_rpath_and_rpath_exclude, #strategy, #strategy=, #symbols=, #symtbl, #symtbl=, #testify, #timeout=, to_form, #to_s, to_yaml_type, #wclass=

Constructor Details

This class inherits a constructor from Uttk::Strategies::Strategy

Instance Attribute Details

#my_dataObject (readonly)

Contains the OCmd::Datas::Data object, the result of the command running.



69
70
71
# File 'lib/uttk/strategies/Command.rb', line 69

def my_data
  @my_data
end

#runnerObject

The OCmd::Runners::Runner used to run the command.



72
73
74
# File 'lib/uttk/strategies/Command.rb', line 72

def runner
  @runner
end

Instance Method Details

#prologueObject

Methods



24
25
26
27
28
29
30
31
# File 'lib/uttk/strategies/Command.rb', line 24

def prologue
  super
  @runner = mk_system_runner @env
  @command = @command.to_ocmd
  @command += @args.to_ocmd_args
  @command.dir = @dir
  @command.input = @input
end