Class: Hpricot::Doc

Inherits:
Object
  • Object
show all
Defined in:
lib/html2slim/hpricot_monkeypatches.rb

Instance Method Summary collapse

Instance Method Details

#to_slimObject



117
118
119
120
121
122
123
# File 'lib/html2slim/hpricot_monkeypatches.rb', line 117

def to_slim
  if respond_to?(:children) and children
    children.map { |x| x.to_slim }.select{|e| !e.nil? }.join("\n")
  else
    ''
  end
end