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



114
115
116
# File 'lib/hanami/cli/commands/command.rb', line 114

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



120
121
122
# File 'lib/hanami/cli/commands/command.rb', line 120

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