Class: Tzispa::Command::App

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

Constant Summary collapse

APP_STRUCTURE =
[
  'api',
  'locales',
  'error',
  'helpers',
  'middleware',
  'rig',
  'rig/block',
  'rig/layout',
  'rig/static',
  'services'
]

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ App

Returns a new instance of App.



30
31
32
# File 'lib/tzispa/command/app.rb', line 30

def initialize(name)
  @domain = Tzispa::Domain.new(name)
end

Instance Attribute Details

#configObject (readonly)

Returns the value of attribute config.



28
29
30
# File 'lib/tzispa/command/app.rb', line 28

def config
  @config
end

#domainObject (readonly)

Returns the value of attribute domain.



28
29
30
# File 'lib/tzispa/command/app.rb', line 28

def domain
  @domain
end

Instance Method Details

#generate(host, mount_path = nil) ⇒ Object



34
35
36
37
38
39
40
# File 'lib/tzispa/command/app.rb', line 34

def generate(host, mount_path=nil)
  update_project
  create_structure
  create_class mount_path
  create_appconfig(host)
  create_home_layout
end