Class: Crawlscope::Rules::Indexability
- Inherits:
-
Object
- Object
- Crawlscope::Rules::Indexability
- Defined in:
- lib/crawlscope/rules/indexability.rb
Constant Summary collapse
- ROBOTS_META_SELECTOR =
'meta[name="robots"], meta[name="googlebot"]'- X_ROBOTS_TAG_HEADER =
"x-robots-tag"
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #call(urls:, pages:, issues:, context: nil) ⇒ Object
-
#initialize ⇒ Indexability
constructor
A new instance of Indexability.
Constructor Details
#initialize ⇒ Indexability
Returns a new instance of Indexability.
11 12 13 |
# File 'lib/crawlscope/rules/indexability.rb', line 11 def initialize @code = :indexability end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
9 10 11 |
# File 'lib/crawlscope/rules/indexability.rb', line 9 def code @code end |
Instance Method Details
#call(urls:, pages:, issues:, context: nil) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/crawlscope/rules/indexability.rb', line 15 def call(urls:, pages:, issues:, context: nil) pages.each do |page| (page, issues) if page.html? validate_x_robots_tag(page, issues) end end |