Module: Oga::XML::ElementToHAML
- Defined in:
- lib/epitools/gem_ext/oga.rb
Overview
Serialize this node to HAML
Instance Method Summary collapse
- #pretty ⇒ Object
- #to_haml ⇒ Object (also: #haml)
Instance Method Details
#pretty ⇒ Object
13 14 15 16 |
# File 'lib/epitools/gem_ext/oga.rb', line 13 def pretty require 'coderay' puts CodeRay.scan(haml, :haml).term end |
#to_haml ⇒ Object Also known as: haml
6 7 8 9 10 |
# File 'lib/epitools/gem_ext/oga.rb', line 6 def to_haml require 'html2haml' require 'html2haml/html' Html2haml::HTML.new(to_xml, {}).render.rstrip end |