Class: Hanami::Commands::New::Container

Inherits:
Abstract
  • Object
show all
Defined in:
lib/hanami/commands/new/container.rb

Overview

Since:

  • 0.1.0

Constant Summary collapse

DEFAULT_APPLICATION_NAME =

Since:

  • 0.1.0

'web'.freeze

Constants inherited from Abstract

Abstract::DEFAULT_APPLICATION_BASE_URL, Abstract::DEFAULT_ARCHITECTURE

Instance Attribute Summary

Attributes inherited from Abstract

#database_config, #options, #target_path, #test_framework

Instance Method Summary collapse

Methods inherited from Abstract

#initialize, #start

Methods included from Generators::Generatable

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

Constructor Details

This class inherits a constructor from Hanami::Commands::New::Abstract

Instance Method Details

#map_templatesObject

Since:

  • 0.1.0



11
12
13
14
15
16
17
# File 'lib/hanami/commands/new/container.rb', line 11

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



30
31
32
33
# File 'lib/hanami/commands/new/container.rb', line 30

def post_process_templates
  init_git
  generate_app
end

#template_optionsObject

Since:

  • 0.1.0



19
20
21
22
23
24
25
26
27
28
# File 'lib/hanami/commands/new/container.rb', line 19

def template_options
  {
    app_name:              app_name,
    hanami_head:            hanami_head?,
    test:                  test_framework.framework,
    database:              database_config.type,
    database_config:       database_config.to_hash,
    hanami_model_version:   hanami_model_version,
  }
end