class Benchmark::HTTP::LinksFilter
Attributes
base[R]
links[R]
Public Class Methods
new(*)
click to toggle source
Calls superclass method
# File lib/benchmark/http/links_filter.rb, line 26 def initialize(*) super @base = nil @links = [] end
Public Instance Methods
filter(node)
click to toggle source
# File lib/benchmark/http/links_filter.rb, line 36 def filter(node) if node.name == 'base' @base = node['href'] elsif node.name == 'a' @links << node['href'] end node.skip!(TAG) end