Class: Hem::Lib::Seed::Template
- Inherits:
-
Object
- Object
- Hem::Lib::Seed::Template
- Defined in:
- lib/hem/lib/seed/template.rb
Instance Method Summary collapse
- #config ⇒ Object
-
#initialize(config) ⇒ Template
constructor
A new instance of Template.
- #render(content, filename) ⇒ Object
Constructor Details
#initialize(config) ⇒ Template
Returns a new instance of Template.
5 6 7 |
# File 'lib/hem/lib/seed/template.rb', line 5 def initialize(config) @config = config end |
Instance Method Details
#config ⇒ Object
9 10 11 |
# File 'lib/hem/lib/seed/template.rb', line 9 def config @config end |
#render(content, filename) ⇒ Object
13 14 15 16 17 |
# File 'lib/hem/lib/seed/template.rb', line 13 def render(content, filename) erb = ERB.new(content) erb.filename = filename erb.result binding end |