Module: Omnitest::Core::CLI::PerformCommand
- Included in:
- Omnitest::Core::CLI
- Defined in:
- lib/omnitest/core/cli.rb
Overview
Common module to load and invoke a CLI-implementation agnostic command.
Instance Attribute Summary collapse
-
#action ⇒ Object
readonly
Returns the value of attribute action.
Instance Method Summary collapse
-
#perform(task, command, args = nil, additional_options = {}) ⇒ Object
Perform a scenario subcommand.
Instance Attribute Details
#action ⇒ Object (readonly)
Returns the value of attribute action.
9 10 11 |
# File 'lib/omnitest/core/cli.rb', line 9 def action @action end |
Instance Method Details
#perform(task, command, args = nil, additional_options = {}) ⇒ Object
Perform a scenario subcommand.
20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/omnitest/core/cli.rb', line 20 def perform(task, command, args = nil, = {}) require "omnitest/command/#{command}" = { help: -> { help(task) }, test_dir: @test_dir, shell: shell }.merge() str_const = Thor::Util.camel_case(command) klass = ::Omnitest::Command.const_get(str_const) klass.new(task, args, , ).call end |