Class: ForemanDebian::Template::Storage
- Inherits:
-
OpenStruct
- Object
- OpenStruct
- ForemanDebian::Template::Storage
- Defined in:
- lib/foreman_debian/template.rb
Direct Known Subclasses
Instance Method Summary collapse
Instance Method Details
#render(template_name) ⇒ Object
5 6 7 8 9 |
# File 'lib/foreman_debian/template.rb', line 5 def render(template_name) templates_dir = Pathname.new(__FILE__).dirname.dirname.dirname.join('templates') template = templates_dir.join("#{template_name}.erb") ERB.new(template.read).result(binding) end |