Class: Qtrix::CLI::Base
- Inherits:
-
Object
- Object
- Qtrix::CLI::Base
- Includes:
- Mixlib::CLI
- Defined in:
- lib/qtrix/cli.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#stderr ⇒ Object
readonly
Returns the value of attribute stderr.
-
#stdout ⇒ Object
readonly
Returns the value of attribute stdout.
Instance Method Summary collapse
- #exec ⇒ Object
-
#initialize(stdout = STDOUT, stderr = STDERR) ⇒ Base
constructor
A new instance of Base.
Constructor Details
#initialize(stdout = STDOUT, stderr = STDERR) ⇒ Base
Returns a new instance of Base.
10 11 12 13 14 |
# File 'lib/qtrix/cli.rb', line 10 def initialize(stdout=STDOUT, stderr=STDERR) super() @stdout = stdout @stderr = stderr end |
Instance Attribute Details
#stderr ⇒ Object (readonly)
Returns the value of attribute stderr.
8 9 10 |
# File 'lib/qtrix/cli.rb', line 8 def stderr @stderr end |
#stdout ⇒ Object (readonly)
Returns the value of attribute stdout.
8 9 10 |
# File 'lib/qtrix/cli.rb', line 8 def stdout @stdout end |
Instance Method Details
#exec ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/qtrix/cli.rb', line 16 def exec Qtrix.connection_config(config) unless exec_behavior msg = "no appropriate combination of options.\n\n" msg += "Type 'bundle exec [command] --help' for usage" error(msg) end rescue StandardError => e error("Failure: #{e}") end |