Class: Orats::Commands::New
- Inherits:
-
Orats::Common
- Object
- Orats::Common
- Orats::Commands::New
- Defined in:
- lib/orats/commands/new.rb
Constant Summary collapse
- AVAILABLE_TEMPLATES =
{ base: 'dockerized production ready application' }.freeze
Instance Method Summary collapse
- #available_templates ⇒ Object
- #init ⇒ Object
-
#initialize(target_path = '', options = {}) ⇒ New
constructor
A new instance of New.
Methods inherited from Orats::Common
#base_path, #exit_if_path_exists, #file_to_string
Methods included from UI
Constructor Details
#initialize(target_path = '', options = {}) ⇒ New
Returns a new instance of New.
15 16 17 |
# File 'lib/orats/commands/new.rb', line 15 def initialize(target_path = '', = {}) super end |
Instance Method Details
#available_templates ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/orats/commands/new.rb', line 27 def available_templates puts log 'templates', 'Add `-t TEMPLATE` to the new command to use a template', :magenta puts AVAILABLE_TEMPLATES.each_pair do |key, value| log key, value, :cyan end end |
#init ⇒ Object
19 20 21 22 23 24 25 |
# File 'lib/orats/commands/new.rb', line 19 def init check_exit_conditions create_template personalize_template rename_env_file what_to_do_next end |