Module: Ronin::Support::Text::ERB::Mixin
- Included in:
- Mixin
- Defined in:
- lib/ronin/support/text/erb/mixin.rb
Overview
Mixin which adds erb helper methods.
Instance Method Summary collapse
-
#erb(path) ⇒ String
Renders the ERB template file.
Instance Method Details
#erb(path) ⇒ String
Renders the ERB template file.
38 39 40 41 42 |
# File 'lib/ronin/support/text/erb/mixin.rb', line 38 def erb(path) erb = ::ERB.new(File.read(path), trim_mode: '-') return erb.result(binding) end |