Class: Dry::Web::Roda::CLI

Inherits:
Thor
  • Object
show all
Defined in:
lib/dry/web/roda/cli.rb,
lib/dry/web/roda/cli/generate.rb

Defined Under Namespace

Classes: Generate

Instance Method Summary collapse

Instance Method Details

#new(app_name) ⇒ Object



9
10
11
12
13
14
15
16
17
18
# File 'lib/dry/web/roda/cli.rb', line 9

def new(app_name)
  case options[:arch]
  when "umbrella"
    require "dry/web/roda/generators/umbrella_project"
    Generators::UmbrellaProject.new(app_name).call
  when "flat"
    require "dry/web/roda/generators/flat_project"
    Generators::FlatProject.new(app_name).call
  end
end