Module: Haml2Erb

Defined in:
lib/haml2erb.rb,
lib/haml2erb/lexer.rb,
lib/haml2erb/parser.rb,
lib/haml2erb/tokens.rb,
lib/haml2erb/railtie.rb,
lib/haml2erb/version.rb,
lib/haml2erb/erb_writer.rb,
lib/haml2erb/mixins/comerging.rb

Defined Under Namespace

Modules: Mixins, Tokens Classes: ErbWriter, HamlLexer, HamlParser, Railtie

Constant Summary collapse

VERSION =
"0.2.1"

Class Method Summary collapse

Class Method Details

.convert(text) ⇒ Object


8
9
10
11
12
13
# File 'lib/haml2erb.rb', line 8

def self.convert(text)
  parser = Haml2Erb::HamlParser.new
  writer = Haml2Erb::ErbWriter.new
  parser.parse(text, writer)
  writer.output_to_string
end