Class: Hanami::CLI::Commands::New::TemplateEngine Private
- Inherits:
-
Object
- Object
- Hanami::CLI::Commands::New::TemplateEngine
- Defined in:
- lib/hanami/cli/commands/new.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: UnsupportedTemplateEngine
Constant Summary collapse
- SUPPORTED_ENGINES =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
%w[erb haml slim].freeze
- DEFAULT_ENGINE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
'erb'.freeze
Instance Attribute Summary collapse
- #name ⇒ Object readonly private
Instance Method Summary collapse
-
#initialize(hanamirc, engine) ⇒ TemplateEngine
constructor
private
A new instance of TemplateEngine.
Constructor Details
#initialize(hanamirc, engine) ⇒ TemplateEngine
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of TemplateEngine.
220 221 222 223 |
# File 'lib/hanami/cli/commands/new.rb', line 220 def initialize(hanamirc, engine) @name = (engine || hanamirc..fetch(:template)) assert_engine! end |
Instance Attribute Details
#name ⇒ Object (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
216 217 218 |
# File 'lib/hanami/cli/commands/new.rb', line 216 def name @name end |