module Ronin::Support::Text::ERB::Mixin

Mixin which adds ‘erb` helper methods.

Public Instance Methods

erb(path) click to toggle source

Renders the ERB template file.

@param [String] path

The path to the ERB template file.

@return [String]

The rendered result.
# 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