Class: RailzLite::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/railz_lite/cli.rb

Instance Method Summary collapse

Instance Method Details

#db_resetObject



24
25
26
# File 'lib/railz_lite/cli.rb', line 24

def db_reset
  DBConnection.reset
end

#new(project_name) ⇒ Object



9
10
11
# File 'lib/railz_lite/cli.rb', line 9

def new(project_name)
  RailzLite::Generators::Project.start([project_name])
end

#serverObject



14
15
16
17
18
19
20
21
# File 'lib/railz_lite/cli.rb', line 14

def server
  file =  File.join(Dir.pwd, 'config', 'server.rb')
  if File.exist?(file)
    system('ruby', file)
  else
    raise "File not found at #{file}"
  end
end