Class: Locomotive::Wagon::InitCommand
- Inherits:
-
Struct
- Object
- Struct
- Locomotive::Wagon::InitCommand
- Defined in:
- lib/locomotive/wagon/commands/init_command.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#generator_klass ⇒ Object
Returns the value of attribute generator_klass.
-
#options ⇒ Object
Returns the value of attribute options.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#args ⇒ Object
Returns the value of attribute args
3 4 5 |
# File 'lib/locomotive/wagon/commands/init_command.rb', line 3 def args @args end |
#generator_klass ⇒ Object
Returns the value of attribute generator_klass
3 4 5 |
# File 'lib/locomotive/wagon/commands/init_command.rb', line 3 def generator_klass @generator_klass end |
#options ⇒ Object
Returns the value of attribute options
3 4 5 |
# File 'lib/locomotive/wagon/commands/init_command.rb', line 3 def @options end |
Class Method Details
.generate(klass, args, options) ⇒ Object
5 6 7 |
# File 'lib/locomotive/wagon/commands/init_command.rb', line 5 def self.generate(klass, args, ) new(klass, args, ).generate end |
Instance Method Details
#generate ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/locomotive/wagon/commands/init_command.rb', line 9 def generate args, opts = Thor::Options.split(self.args) generator = generator_klass.new(args, opts, {}) generator.force_color_if_asked() generator.invoke_all end |