Top Level Namespace
Defined Under Namespace
Constant Summary collapse
- ROOT =
File.(File.join(File.dirname(__FILE__), '..', '..'))
- LIBDIR =
- INCLUDEDIR =
- HEADER_DIRS =
There’s no default include/lib dir on Windows. Let’s just add the Ruby ones and resort on the search path specified by INCLUDE and LIB environment variables
[ # First search /opt/local for macports '/opt/local/include', # Then search /usr/local for people that installed from source '/usr/local/include', # Check the ruby install locations INCLUDEDIR, # Finally fall back to /usr '/usr/include', '/usr/include/libxml2', ]
- LIB_DIRS =
[ # First search /opt/local for macports '/opt/local/lib', # Then search /usr/local for people that installed from source '/usr/local/lib', # Check the ruby install locations LIBDIR, # Finally fall back to /usr '/usr/lib', ]
- XML2_HEADER_DIRS =
[ '/opt/local/include/libxml2', '/usr/local/include/libxml2', File.join(INCLUDEDIR, "libxml2") ] + HEADER_DIRS
Instance Method Summary collapse
- #asplode(lib) ⇒ Object
-
#Nokogiri(*args, &block) ⇒ Object
Parser a document contained in
args
.
Instance Method Details
#asplode(lib) ⇒ Object
90 91 92 |
# File 'ext/nokogiri/extconf.rb', line 90 def asplode(lib) abort "-----\n#{lib} is missing. please visit http://nokogiri.org/tutorials/installing_nokogiri.html for help with installing dependencies.\n-----" end |
#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.
126 127 128 129 130 131 132 133 |
# File 'lib/nokogiri.rb', line 126 def Nokogiri(*args, &block) if block_given? builder = Nokogiri::HTML::Builder.new(&block) return builder.doc.root else Nokogiri.parse(*args) end end |