Class: Bridgetown::Converters::RubyTemplates

Inherits:
Bridgetown::Converter show all
Defined in:
lib/bridgetown-core/converters/ruby_templates.rb

Instance Method Summary collapse

Methods inherited from Bridgetown::Converter

#initialize, input, #inspect, #line_start, #matches, #output_ext, support_slots, supports_slots?

Methods inherited from Plugin

#initialize

Methods included from Prioritizable

#<=>, included

Constructor Details

This class inherits a constructor from Bridgetown::Converter

Instance Method Details

#convert(content, convertible) ⇒ Object



9
10
11
12
13
14
# File 'lib/bridgetown-core/converters/ruby_templates.rb', line 9

def convert(content, convertible)
  erb_view = Bridgetown::ERBView.new(convertible)
  erb_view.instance_eval(
    content, convertible.path.to_s, line_start(convertible)
  ).to_s
end