Class: Hanami::CLIBulma::Generators::App::Slice Private

Inherits:
Hanami::CLI::Generators::App::Slice
  • Object
show all
Defined in:
lib/hanami/cli_bulma/generators/app/slice.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:

  • 2.0.0

Instance Method Summary collapse

Instance Method Details

#template(path, context) ⇒ Object Also known as: t

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:

  • 2.0.0



12
13
14
15
16
17
18
19
# File 'lib/hanami/cli_bulma/generators/app/slice.rb', line 12

def template(path, context)
  require "erb"

  ERB.new(
    File.read(__dir__ + "/slice/#{path}"),
    trim_mode: "-"
  ).result(context.ctx)
end