Class: Cloud::Sh::Commands::Base
- Inherits:
-
Object
- Object
- Cloud::Sh::Commands::Base
- Includes:
- Helpers::Commands
- Defined in:
- lib/cloud/sh/commands/base.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
readonly
Returns the value of attribute args.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
- #config ⇒ Object
- #execute ⇒ Object
-
#initialize(options:, args:) ⇒ Base
constructor
A new instance of Base.
Methods included from Helpers::Commands
Constructor Details
#initialize(options:, args:) ⇒ Base
Returns a new instance of Base.
18 19 20 21 |
# File 'lib/cloud/sh/commands/base.rb', line 18 def initialize(options:, args:) @options = @args = args end |
Instance Attribute Details
#args ⇒ Object (readonly)
Returns the value of attribute args.
9 10 11 |
# File 'lib/cloud/sh/commands/base.rb', line 9 def args @args end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
9 10 11 |
# File 'lib/cloud/sh/commands/base.rb', line 9 def @options end |
Class Method Details
.execute(global_options, options, args) ⇒ Object
11 12 13 14 15 16 |
# File 'lib/cloud/sh/commands/base.rb', line 11 def self.execute(, , args) new(options: .merge(), args: args).execute rescue Exception => e puts e.backtrace.join("\n") puts e.inspect end |