Class: Testcloud::Generator::Commands::Base
- Inherits:
-
Object
- Object
- Testcloud::Generator::Commands::Base
- Defined in:
- lib/testcloud/generator/commands/base.rb
Instance Attribute Summary collapse
-
#options ⇒ Object
Returns the value of attribute options.
-
#parsed_options ⇒ Object
readonly
Returns the value of attribute parsed_options.
-
#template_options ⇒ Object
readonly
Returns the value of attribute template_options.
-
#thor ⇒ Object
readonly
Returns the value of attribute thor.
Instance Method Summary collapse
- #abort_command(msg = nil) ⇒ Object
- #confirmation_prompt ⇒ Object
- #execute_command ⇒ Object
-
#initialize(options = {}, thor) ⇒ Base
constructor
A new instance of Base.
- #readline ⇒ Object
- #run ⇒ Object
Constructor Details
#initialize(options = {}, thor) ⇒ Base
Returns a new instance of Base.
9 10 11 12 13 |
# File 'lib/testcloud/generator/commands/base.rb', line 9 def initialize( = {}, thor) = @thor = thor = {} end |
Instance Attribute Details
#options ⇒ Object
Returns the value of attribute options.
8 9 10 |
# File 'lib/testcloud/generator/commands/base.rb', line 8 def end |
#parsed_options ⇒ Object (readonly)
Returns the value of attribute parsed_options.
7 8 9 |
# File 'lib/testcloud/generator/commands/base.rb', line 7 def end |
#template_options ⇒ Object (readonly)
Returns the value of attribute template_options.
7 8 9 |
# File 'lib/testcloud/generator/commands/base.rb', line 7 def end |
#thor ⇒ Object (readonly)
Returns the value of attribute thor.
7 8 9 |
# File 'lib/testcloud/generator/commands/base.rb', line 7 def thor @thor end |
Instance Method Details
#abort_command(msg = nil) ⇒ Object
31 32 33 34 |
# File 'lib/testcloud/generator/commands/base.rb', line 31 def abort_command(msg = nil) $stdout.printf "aborting %s ...\n" % msg.to_s exit(1) end |
#confirmation_prompt ⇒ Object
15 16 |
# File 'lib/testcloud/generator/commands/base.rb', line 15 def confirmation_prompt end |
#execute_command ⇒ Object
23 24 25 |
# File 'lib/testcloud/generator/commands/base.rb', line 23 def execute_command raise 'Implement' end |
#readline ⇒ Object
27 28 29 |
# File 'lib/testcloud/generator/commands/base.rb', line 27 def readline $stdin.gets.chomp! end |
#run ⇒ Object
18 19 20 21 |
# File 'lib/testcloud/generator/commands/base.rb', line 18 def run confirmation_prompt execute_command end |