Class: PP

Inherits:
PrettyPrint
  • Object
show all
Defined in:
lib/pphtml.rb

Class Method Summary collapse

Class Method Details

.pphtml(html) ⇒ Object

Displays nice formatted output for an HTML string, or something that can look like one



10
11
12
13
14
# File 'lib/pphtml.rb', line 10

def PP.pphtml(html)
  pretty_html = HtmlBeautifier.beautify(html.to_s)
  puts CodeRay.scan(pretty_html, :html).terminal
  pretty_html
end