Class: Bridgetown::Converters::RubyTemplates

Inherits:
Bridgetown::Converter show all
Defined in:
bridgetown-core/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



65
66
67
68
69
70
71
# File 'bridgetown-core/lib/bridgetown-core/converters/ruby_templates.rb', line 65

def convert(content, convertible)
  rb_view = Bridgetown::PureRubyView.new(convertible)
  results = rb_view.instance_eval(
    content, convertible.path.to_s, line_start(convertible)
  )
  rb_view._output_buffer || results.to_s
end