Class: Jarvis::CLI

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

Instance Method Summary collapse

Instance Method Details

#boot(*args) ⇒ Object


13
14
15
16
17
# File 'lib/jarvis/cli.rb', line 13

def boot(*args)
  port_option = args.include?('-p') ? '' : ' -p 3030'
  command = "rackup #{port_option}"
  run_command(command)
end

#new(name) ⇒ Object


7
8
9
10
# File 'lib/jarvis/cli.rb', line 7

def new(name)
  @name = Thor::Util.snake_case(name)
  directory(:project, @name)
end