Methods
Included Modules
Public Instance methods
[ show source ]
# File actionpack/lib/action_view/template_handlers/erb.rb, line 13
13: def compile(template)
14: magic = $1 if template.source =~ /\A(<%#.*coding[:=]\s*(\S+)\s*-?%>)/
15: erb = "#{magic}<% __in_erb_template=true %>#{template.source}"
16:
17: if erb.respond_to?(:force_encoding)
18: erb.force_encoding(template.source.encoding)
19: end
20:
21: ::ERB.new(erb, nil, erb_trim_mode, '@output_buffer').src
22: end