class Object - nokogiri-1.10.3 Documentation

# class Object

### Public Instance Methods

Nokogiri(*args, &block) click to toggle source

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.

    # File lib/nokogiri.rb, line 137
    def Nokogiri(*args, &block)
      if block_given?
        Nokogiri::HTML::Builder.new(&block).doc.root
      else
        Nokogiri.parse(*args)
      end
    end