Module: Orange::Pulp::ParserPulp

Defined in:
lib/orange-core/resources/parser.rb

Instance Method Summary collapse

Instance Method Details

#html(&block) ⇒ Object



106
107
108
109
110
111
112
113
114
# File 'lib/orange-core/resources/parser.rb', line 106

def html(&block)
  if block_given?
    unless(packet[:content].blank?)
      doc = orange[:parser].hpricot(packet[:content])
      yield doc
      packet[:content] = doc.to_s
    end
  end
end