Class: Lotus::Commands::New::App

Inherits:
Abstract
  • Object
show all
Defined in:
lib/lotus/commands/new/app.rb

Overview

Since:

  • 0.1.0

Constant Summary

Constants inherited from Abstract

Lotus::Commands::New::Abstract::DEFAULT_APPLICATION_BASE_URL, Lotus::Commands::New::Abstract::DEFAULT_ARCHITECTURE

Instance Attribute Summary

Attributes inherited from Abstract

#database_config, #options, #target_path

Instance Method Summary collapse

Methods inherited from Abstract

#start

Methods included from Generators::Generatable

#add_mapping, #destroy, #generator, #process_templates, #start, #target_path

Constructor Details

#initialize(options, name) ⇒ App

Returns a new instance of App.

Since:

  • 0.1.0



8
9
10
# File 'lib/lotus/commands/new/app.rb', line 8

def initialize(options, name)
  super(options, name)
end

Instance Method Details

#map_templatesObject

Since:

  • 0.1.0



12
13
14
15
16
17
18
# File 'lib/lotus/commands/new/app.rb', line 12

def map_templates
  add_application_templates
  add_empty_directories
  add_test_templates
  add_sql_templates
  add_git_templates
end

#post_process_templatesObject

Since:

  • 0.1.0



34
35
36
# File 'lib/lotus/commands/new/app.rb', line 34

def post_process_templates
  init_git
end

#template_optionsObject

Since:

  • 0.1.0



20
21
22
23
24
25
26
27
28
29
30
31
32
# File 'lib/lotus/commands/new/app.rb', line 20

def template_options
  {
    app_name:              app_name,
    upcase_app_name:       upcase_app_name,
    classified_app_name:   classified_app_name,
    application_base_url:  application_base_url,
    lotus_head:            lotus_head?,
    test:                  test_framework.framework,
    database:              database_config.type,
    database_config:       database_config.to_hash,
    lotus_model_version:   lotus_model_version,
  }
end