Class: Crawlscope::Rules::StructuredData
- Inherits:
-
Object
- Object
- Crawlscope::Rules::StructuredData
- Defined in:
- lib/crawlscope/rules/structured_data.rb
Instance Attribute Summary collapse
-
#code ⇒ Object
readonly
Returns the value of attribute code.
Instance Method Summary collapse
- #call(urls:, pages:, issues:, context:) ⇒ Object
-
#initialize ⇒ StructuredData
constructor
A new instance of StructuredData.
Constructor Details
#initialize ⇒ StructuredData
Returns a new instance of StructuredData.
8 9 10 |
# File 'lib/crawlscope/rules/structured_data.rb', line 8 def initialize @code = :structured_data end |
Instance Attribute Details
#code ⇒ Object (readonly)
Returns the value of attribute code.
6 7 8 |
# File 'lib/crawlscope/rules/structured_data.rb', line 6 def code @code end |
Instance Method Details
#call(urls:, pages:, issues:, context:) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/crawlscope/rules/structured_data.rb', line 12 def call(urls:, pages:, issues:, context:) schema_registry = context.fetch(:schema_registry) pages.each do |page| next unless page.html? validate_page(page, issues, schema_registry) end end |