Module: Ronin::Templates::Erb
Included Modules
Public Visibility
Public Instance Method Summary
| #erb(template) |
Renders the inline ERB template in the scope of the object. Returns: String |
|---|---|
| #erb_file(template_path) |
Renders an ERB template file in the scope of the object. Returns: String |
Public Instance Method Details
erb
Renders the inline ERB template in the scope of the object.
[View source]
47 48 49 |
# File 'lib/ronin/templates/erb.rb', line 47 def erb(template) ERB.new(template).result(binding) end |
erb_file
Renders an ERB template file in the scope of the object.
[View source]
63 64 65 66 67 |
# File 'lib/ronin/templates/erb.rb', line 63 def erb_file(template_path) enter_template(template_path) do |path| erb(File.read(path)) end end |