Methods

Scrubyt::AttributeFilter

Public Instance Methods

evaluate(source) click to toggle source
# File lib/scrubyt/core/scraping/filters/attribute_filter.rb, line 4
def evaluate(source)
  elem = XPathUtils.find_nearest_node_with_attribute(source, @example)
  if elem.is_a? Hpricot::Elem
    return [elem.attributes[@example]]
  else
    return nil
  end
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.