class Kudzu::Agent::Robots::RuleSet
Attributes
crawl_delay[RW]
rules[RW]
user_agent[RW]
Public Class Methods
new(attr = {})
click to toggle source
Calls superclass method
Kudzu::Model::Base::new
# File lib/kudzu/agent/robots/txt.rb, line 16 def initialize(attr = {}) self.rules = [] super end
Public Instance Methods
allowed_path?(uri)
click to toggle source
# File lib/kudzu/agent/robots/txt.rb, line 21 def allowed_path?(uri) rules.each do |rule| return rule.allow if uri.path =~ rule.path end return true end