Class: Hanami::CLI::Commands::New::TemplateEngine Private

Inherits:
Object
  • Object
show all
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.

Since:

  • 1.1.0

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.

Since:

  • 1.1.0

%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.

Since:

  • 1.1.0

'erb'.freeze

Instance Attribute Summary collapse

Instance Method Summary collapse

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.

Since:

  • 1.1.0



220
221
222
223
# File 'lib/hanami/cli/commands/new.rb', line 220

def initialize(hanamirc, engine)
  @name = (engine || hanamirc.options.fetch(:template))
  assert_engine!
end

Instance Attribute Details

#nameObject (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.

Since:

  • 1.1.0



216
217
218
# File 'lib/hanami/cli/commands/new.rb', line 216

def name
  @name
end