Class: Tbox::Rack

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

Overview

Rack tasks for your application.

Instance Method Summary collapse

Instance Method Details

#initObject

Initialize a new Rack-based Application



12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# File 'lib/tb-cli/cli/rack.rb', line 12

def init
  setup = yes? "Would you like to set up a new Rack-based Application?"
  if setup
    say "awesome!", Thor::Color::BOLD + Thor::Color::RED, false
    say " let's get to work"
    @project = ask "Name of project: " 
    if @project
      gen_project @project
    else
      say "You need to supply a project name"
    end
  else
    say "Shucks"
  end
end