Class: Crawlr::Robots::Rule

Inherits:
Struct
  • Object
show all
Defined in:
lib/crawlr/robots.rb

Overview

Represents a robots.txt rule for a specific user-agent

Since:

  • 0.1.0

Instance Attribute Summary collapse

Instance Attribute Details

#allowArray<String> (readonly)

Returns Array of allowed path patterns.

Returns:

  • (Array<String>)

    Array of allowed path patterns



73
# File 'lib/crawlr/robots.rb', line 73

Rule = Struct.new(:user_agent, :allow, :disallow, :crawl_delay)

#crawl_delayString? (readonly)

Returns Crawl delay in seconds for this user-agent.

Returns:

  • (String, nil)

    Crawl delay in seconds for this user-agent



73
# File 'lib/crawlr/robots.rb', line 73

Rule = Struct.new(:user_agent, :allow, :disallow, :crawl_delay)

#disallowArray<String> (readonly)

Returns Array of disallowed path patterns.

Returns:

  • (Array<String>)

    Array of disallowed path patterns



73
# File 'lib/crawlr/robots.rb', line 73

Rule = Struct.new(:user_agent, :allow, :disallow, :crawl_delay)

#user_agentString (readonly)

Returns User-agent pattern this rule applies to.

Returns:

  • (String)

    User-agent pattern this rule applies to



73
# File 'lib/crawlr/robots.rb', line 73

Rule = Struct.new(:user_agent, :allow, :disallow, :crawl_delay)