Class: Cuprum::Cli::Commands::File::RenderErb

Inherits:
Cuprum::Command
  • Object
show all
Defined in:
lib/cuprum/cli/commands/file/render_erb.rb

Overview

Utility command for generating file contents from an .erb template.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(template_name: nil) ⇒ RenderErb

Returns a new instance of RenderErb.

Parameters:

  • template_name (String, nil) (defaults to: nil)

    the name of the rendered template. Used for error reporting.



17
18
19
20
21
# File 'lib/cuprum/cli/commands/file/render_erb.rb', line 17

def initialize(template_name: nil)
  super()

  @template_name = template_name
end

Instance Attribute Details

#template_nameString? (readonly)

Returns the name of the rendered template.

Returns:

  • (String, nil)

    the name of the rendered template.



24
25
26
# File 'lib/cuprum/cli/commands/file/render_erb.rb', line 24

def template_name
  @template_name
end