class Nokogiri::XML::XPathContext

Public Instance Methods

evaluate(search_path, handler=nil) click to toggle source
# File lib/kitchen/patches/nokogiri_profiling.rb, line 44
def evaluate(search_path, handler=nil)
  puts search_path if ENV['VERBOSE_PROFILE']

  PROFILE_DATA[search_path] ||= Hash.new(0)
  PROFILE_DATA[search_path][:count] += 1

  start_time = Time.now
  original_evaluate(search_path, handler).tap do
    PROFILE_DATA[search_path][:time] += Time.now - start_time
  end
end
Also aliased as: original_evaluate
original_evaluate(search_path, handler=nil)
Alias for: evaluate