# File lib/webrobots/robotstxt.rb, line 606 606: def initialize(agentlines, rulelines) 607: @patterns = agentlines.map { |agentline| agentline.pattern } 608: @acls = [] 609: @delay = nil 610: @options = {} 611: rulelines.each { |ruleline| 612: case ruleline 613: when AccessControlLine 614: @acls << ruleline 615: when CrawlDelayLine 616: @delay = ruleline.delay 617: else 618: @options[ruleline.token.downcase] = ruleline.value 619: end 620: } if rulelines 621: @acls.replace @acls.sort_by { |x| 622: [-x.value.length, x.is_a?(AllowLine) ? 1 : 0] 623: } 624: end
# File lib/webrobots/robotstxt.rb, line 638 638: def allow?(request_uri) 639: @acls.each { |acl| 640: if acl.match?(request_uri) 641: return acl.allow? 642: end 643: } 644: return true 645: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.