Class: CLI

Inherits:
Thor show all
Includes:
Thor::Actions
Defined in:
lib/volt/cli.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.source_rootObject



29
30
31
# File 'lib/volt/cli.rb', line 29

def self.source_root
  File.expand_path(File.join(File.dirname(__FILE__), '../../templates'))
end

Instance Method Details

#consoleObject



16
17
18
19
# File 'lib/volt/cli.rb', line 16

def console
  require 'volt/console'
  Console.start
end

#new(name) ⇒ Object



8
9
10
11
12
13
# File 'lib/volt/cli.rb', line 8

def new(name)
  directory(".", name)
  
  say "Bundling Gems...."
  `cd #{name} ; bundle`
end

#serverObject



22
23
24
25
26
27
# File 'lib/volt/cli.rb', line 22

def server
  require 'thin'

  ENV['SERVER'] = 'true'
  Thin::Runner.new(['start']).run!
end