Class: Seo::RecommendationCompletionVerifier
- Inherits:
-
Object
- Object
- Seo::RecommendationCompletionVerifier
- Includes:
- Service
- Defined in:
- app/services/seo/recommendation_completion_verifier.rb
Overview
Verifies that the content change represented by an SEO recommendation is
present and recent before the recommendation can be marked completed.
Defined Under Namespace
Classes: Result
Constant Summary collapse
- VERIFICATION_WINDOW =
30.minutes
- FAQ_MENTION_PATTERN =
/\bfaqs?\b/i
Instance Method Summary collapse
Methods included from Service
#attributes_used, #build_result, call, #logger
Methods included from Service::Initializer
Instance Method Details
#call ⇒ Object
19 20 21 22 23 |
# File 'app/services/seo/recommendation_completion_verifier.rb', line 19 def call return failure('Auto-verification failed: recommendation is required') unless recommendation.is_a?(SiteMapRecommendation) faq_recommendation? ? verify_faq_placement : verify_recent_post end |