Top Level Namespace

Defined Under Namespace

Modules: Nokogiri, XSD

Instance Method Summary collapse

Instance Method Details

#Nokogiri(*args, &block) ⇒ Object

Parser a document contained in args. Nokogiri will try to guess what type of document you are attempting to parse. For more information, see Nokogiri.parse

To specify the type of document, use Nokogiri.XML or Nokogiri.HTML.



120
121
122
123
124
125
126
127
# File 'lib/nokogiri.rb', line 120

def Nokogiri(*args, &block)
  if block_given?
    builder = Nokogiri::HTML::Builder.new(&block)
    return builder.doc.root
  else
    Nokogiri.parse(*args)
  end
end