class Haml::Generator
Ruby code generator, which is a limited version of Temple::Generator. Limit methods since Haml
doesn’t need most of them.
Public Instance Methods
Source
# File lib/haml/generator.rb, line 24 def on_dynamic(code) concat(code) end
Source
# File lib/haml/generator.rb, line 16 def on_multi(*exp) exp.map { |e| compile(e) }.join('; ') end
Source
# File lib/haml/generator.rb, line 20 def on_static(text) concat(options[:freeze_static] ? "#{Util.inspect_obj(text)}.freeze" : Util.inspect_obj(text)) end
Private Instance Methods
Source
# File lib/haml/generator.rb, line 38 def concat(str) "_hamlout.buffer << (#{str});" end