Class: Tzispa::Commands::App

Inherits:
Command
  • Object
show all
Defined in:
lib/tzispa/commands/app.rb

Constant Summary collapse

APP_STRUCTURE =
[
  'api', 'locales', 'error', 'controller', 'helpers', 'view', 'view/_',
  'view/_/block', 'view/_/layout', 'view/_/static', 'services'
].freeze

Constants inherited from Command

Command::NO_PROJECT_FOLDER

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name, options = nil) ⇒ App

Returns a new instance of App.



21
22
23
24
# File 'lib/tzispa/commands/app.rb', line 21

def initialize(name, options = nil)
  super(options)
  @domain = Tzispa::Domain.new(name)
end

Instance Attribute Details

#domainObject (readonly)

Returns the value of attribute domain.



19
20
21
# File 'lib/tzispa/commands/app.rb', line 19

def domain
  @domain
end

Instance Method Details

#generate(mount_path, index_layout, locale) ⇒ Object



26
27
28
29
30
31
32
# File 'lib/tzispa/commands/app.rb', line 26

def generate(mount_path, index_layout, locale)
  update_rackup mount_path
  create_structure
  create_appconfig index_layout, locale
  create_home_layout
  create_routes
end