Class: GettextI18nRails::HamlParser

Inherits:
BaseParser show all
Defined in:
lib/gettext_i18n_rails/haml_parser.rb

Class Method Summary collapse

Methods inherited from BaseParser

load_library, parse, target?

Class Method Details

.convert_to_code(text) ⇒ Object



9
10
11
12
13
14
15
16
# File 'lib/gettext_i18n_rails/haml_parser.rb', line 9

def self.convert_to_code(text)
  case @library_loaded
  when "haml"
    Haml::Engine.new(text).precompiled()
  when "hamlit"
    Hamlit::Engine.new.call(text)
  end
end

.extensionObject



5
6
7
# File 'lib/gettext_i18n_rails/haml_parser.rb', line 5

def self.extension
  "haml"
end

.librariesObject



18
19
20
# File 'lib/gettext_i18n_rails/haml_parser.rb', line 18

def self.libraries
  ["haml", "hamlit"]
end