Module: FWToolkit::Executable
- Defined in:
- lib/fwtoolkit/executable/executable.rb
Defined Under Namespace
Classes: CliRunner, ThorRunner
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.runner=(runner) ⇒ Object
31
32
33
|
# File 'lib/fwtoolkit/executable/executable.rb', line 31
def self.runner=(runner)
@@runner = runner
end
|
Instance Method Details
#run(command, options = {}) ⇒ Object
35
36
37
38
|
# File 'lib/fwtoolkit/executable/executable.rb', line 35
def run(command, options = {})
cmd_output = @@runner.run command, options
@@runner.report_error(command, cmd_output) if options[:raise_errors] && !$?.success?
end
|
#run!(command, options = {}) ⇒ Object
40
41
42
43
|
# File 'lib/fwtoolkit/executable/executable.rb', line 40
def run!(command, options = {})
config.merge!({ :raise_errors => true })
run command config
end
|