Class: HTML::Node
Instance Method Summary collapse
Instance Method Details
#children_without_newlines ⇒ Object
11 12 13 14 15 |
# File 'lib/test/rails/pp_html_document.rb', line 11 def children_without_newlines @children.reject do |c| HTML::Text == c.class and c.content_without_whitespace == "\n" end end |
#pretty_print(q) ⇒ Object
17 18 19 20 21 22 |
# File 'lib/test/rails/pp_html_document.rb', line 17 def pretty_print(q) q.group 1, '[NODE ', ']' do q.breakable q.seplist children_without_newlines do |v| q.pp v end end end |