Class: Lattice::Generator::ERBRenderer
- Inherits:
-
Object
- Object
- Lattice::Generator::ERBRenderer
- Defined in:
- lib/lattice/generator.rb
Overview
Renders ERB file templates for generators
Instance Method Summary collapse
- #app_const_base ⇒ Object
-
#initialize(template, options) ⇒ ERBRenderer
constructor
A new instance of ERBRenderer.
- #render ⇒ Object
Constructor Details
#initialize(template, options) ⇒ ERBRenderer
Returns a new instance of ERBRenderer.
56 57 58 59 |
# File 'lib/lattice/generator.rb', line 56 def initialize(template, ) @template = template @options = end |
Instance Method Details
#app_const_base ⇒ Object
65 |
# File 'lib/lattice/generator.rb', line 65 def app_const_base; @options[:app_const_base]; end |
#render ⇒ Object
61 62 63 |
# File 'lib/lattice/generator.rb', line 61 def render ERB.new(File.read(@template)).result(binding) end |