Class: Liquid::Template

Inherits:
Object
  • Object
show all
Defined in:
lib/locomotive/steam/liquid/patches.rb

Instance Method Summary collapse

Instance Method Details

#parse_with_utf8(source, context = {}) ⇒ Object

creates a new Template object from liquid source code



18
19
20
21
22
23
# File 'lib/locomotive/steam/liquid/patches.rb', line 18

def parse_with_utf8(source, context = {})
  if RUBY_VERSION =~ /1\.9/
    source = source.force_encoding('UTF-8') if source.present?
  end
  self.parse_without_utf8(source, context)
end