Module: Nokogiri::XML::BangFinders

Defined in:
lib/nokogiri_bang_finders.rb

Instance Method Summary collapse

Instance Method Details

#at!(*args) ⇒ Object



6
7
8
# File 'lib/nokogiri_bang_finders.rb', line 6

def at!(*args)
  at(*args).tap       { |node| raise NotFound if node.nil? }
end

#at_css!(*args) ⇒ Object



14
15
16
# File 'lib/nokogiri_bang_finders.rb', line 14

def at_css!(*args)
  at_css(*args).tap   { |node| raise NotFound if node.nil? }
end

#at_xpath!(*args) ⇒ Object



10
11
12
# File 'lib/nokogiri_bang_finders.rb', line 10

def at_xpath!(*args)
  at_xpath(*args).tap { |node| raise NotFound if node.nil? }
end