Class: Hanami::CLI::Commands::Command::Renderer Private

Inherits:
Object
  • Object
show all
Defined in:
lib/hanami/cli/commands/command.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.

Template renderer

Since:

  • 1.1.0

Constant Summary collapse

TRIM_MODE =

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

"-".freeze

Instance Method Summary collapse

Constructor Details

#initializeRenderer

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 Renderer

Since:

  • 1.1.0



116
117
118
# File 'lib/hanami/cli/commands/command.rb', line 116

def initialize
  freeze
end

Instance Method Details

#call(template, context) ⇒ Object

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



122
123
124
# File 'lib/hanami/cli/commands/command.rb', line 122

def call(template, context)
  ::ERB.new(template, nil, TRIM_MODE).result(context)
end