module Nokogiri::XML::BangFinders

Public Class Methods

context_length() click to toggle source
# File lib/nokogiri_bang_finders.rb, line 7
def self.context_length
  @context_length ||= 200
end
context_length=(val) click to toggle source
# File lib/nokogiri_bang_finders.rb, line 11
def self.context_length=(val)
  @context_length = if val.to_s == "all"
                      Float::INFINITY
                    else
                      val.to_i
                    end
end

Public Instance Methods

at!(*args) click to toggle source
# File lib/nokogiri_bang_finders.rb, line 19
def at!(*args)
  node = at(*args);       raise NotFound.new(args, self) if node.nil?; node
end
at_css!(*args) click to toggle source
# File lib/nokogiri_bang_finders.rb, line 27
def at_css!(*args)
  node = at_css(*args);   raise NotFound.new(args, self) if node.nil?; node
end
at_xpath!(*args) click to toggle source
# File lib/nokogiri_bang_finders.rb, line 23
def at_xpath!(*args)
  node = at_xpath(*args); raise NotFound.new(args, self) if node.nil?; node
end