Class: Locomotive::Wagon::GenerateCommand
- Inherits:
-
Struct
- Object
- Struct
- Locomotive::Wagon::GenerateCommand
- Defined in:
- lib/locomotive/wagon/commands/generate_command.rb
Instance Attribute Summary collapse
-
#args ⇒ Object
Returns the value of attribute args.
-
#name ⇒ Object
Returns the value of attribute name.
-
#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/generate_command.rb', line 3 def args @args end |
#name ⇒ Object
Returns the value of attribute name
3 4 5 |
# File 'lib/locomotive/wagon/commands/generate_command.rb', line 3 def name @name end |
#options ⇒ Object
Returns the value of attribute options
3 4 5 |
# File 'lib/locomotive/wagon/commands/generate_command.rb', line 3 def @options end |
Class Method Details
.generate(name, args, options) ⇒ Object
5 6 7 |
# File 'lib/locomotive/wagon/commands/generate_command.rb', line 5 def self.generate(name, args, ) new(name, args, ).generate end |
Instance Method Details
#generate ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/locomotive/wagon/commands/generate_command.rb', line 9 def generate Locomotive::Wagon.require_misc_gems generator = generator_klass.new(args, , { behavior: :skip }) generator.destination_root = args.last generator.force_color_if_asked() generator.invoke_all end |