Module: HamlParser
- Defined in:
- lib/gettext/haml_parser.rb
Overview
Haml gettext parser
Class Method Summary collapse
Class Method Details
.parse(file, ary = []) ⇒ Object
54 55 56 57 58 |
# File 'lib/gettext/haml_parser.rb', line 54 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
50 51 52 |
# File 'lib/gettext/haml_parser.rb', line 50 def target?(file) File.extname(file) == ".haml" end |