Class: TinyRails::CLI

Inherits:
Thor
  • Object
show all
Includes:
Thor::Actions
Defined in:
lib/tiny-rails/cli.rb

Instance Method Summary collapse

Instance Method Details

#add(addons = []) ⇒ Object



21
22
23
24
# File 'lib/tiny-rails/cli.rb', line 21

def add(addons = [])
  addons = Array(addons)
  Commands::Add.start(addons)
end

#consoleObject



27
28
29
# File 'lib/tiny-rails/cli.rb', line 27

def console
  Commands::Console.start
end

#new(app_path) ⇒ Object



15
16
17
18
# File 'lib/tiny-rails/cli.rb', line 15

def new(app_path)
  Commands::New.start([app_path])
  add(options[:addons]) unless options[:addons].empty?
end