Class: Toppings::CLI
- Inherits:
-
Thor
- Object
- Thor
- Toppings::CLI
- Defined in:
- lib/toppings/cli.rb
Constant Summary collapse
- VALID_GENERATORS =
%w{module setting font setup layout helper}.freeze
Instance Method Summary collapse
Instance Method Details
#g(generator = nil, *args) ⇒ Object
31 32 33 |
# File 'lib/toppings/cli.rb', line 31 def g(generator = nil, *args) generate(generator, *args) end |
#generate(generator = nil, *args) ⇒ Object
17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/toppings/cli.rb', line 17 def generate(generator = nil, *args) if generator if VALID_GENERATORS.include? generator Toppings::Generators::ComponentsGenerator.start(args.unshift(generator)) else ('invalid') end else ('no') end end |
#install ⇒ Object
11 12 13 |
# File 'lib/toppings/cli.rb', line 11 def install Toppings::Generators::InstallGenerator.start end |