Module: Ronin::Web::HTML
- Defined in:
- lib/ronin/web/html.rb
Overview
HTML helper methods.
Class Method Summary collapse
-
.build { ... } ⇒ Nokogiri::HTML::Builder
Creates a new
Nokogiri::HTML::Builder
. -
.parse(html) {|doc| ... } ⇒ Nokogiri::HTML::Document
Parses the body of a document into a HTML document object.
Class Method Details
.build { ... } ⇒ Nokogiri::HTML::Builder
Creates a new Nokogiri::HTML::Builder
.
81 82 83 |
# File 'lib/ronin/web/html.rb', line 81 def self.build(&block) Nokogiri::HTML::Builder.new(&block) end |
.parse(html) {|doc| ... } ⇒ Nokogiri::HTML::Document
Parses the body of a document into a HTML document object.
51 52 53 54 55 |
# File 'lib/ronin/web/html.rb', line 51 def self.parse(html) doc = Nokogiri::HTML.parse(html) yield doc if block_given? return doc end |