Module: HamlParser
- Defined in:
- lib/merb_global/parsers/haml_parser.rb
Overview
Haml gettext parser
Class Method Summary collapse
Class Method Details
.parse(file, ary = []) ⇒ Object
33 34 35 36 37 |
# File 'lib/merb_global/parsers/haml_parser.rb', line 33 def parse(file, ary = []) haml = Haml::Engine.new(IO.readlines(file).join) code = haml.precompiled.split(/$/) GetText::RubyParser.parse_lines(file, code, ary) end |
.target?(file) ⇒ Boolean
29 30 31 |
# File 'lib/merb_global/parsers/haml_parser.rb', line 29 def target?(file) File.extname(file) == ".haml" end |