module Oga::XML::ElementToHAML

Serialize this node to HAML

Public Instance Methods

haml()
Alias for: to_haml
pretty() click to toggle source
# File lib/epitools/gem_ext/oga.rb, line 13
def pretty
  require 'coderay'
  puts CodeRay.scan(haml, :haml).term
end
to_haml() click to toggle source
# 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
Also aliased as: haml