Class: Seo::InternalLinkValidator::BrokenLink

Inherits:
Data
  • Object
show all
Defined in:
app/services/seo/internal_link_validator.rb

Overview

did_you_mean carries up to a few ranked candidate paths from
legacy redirect map → post-slug fuzz → trigram → semantic search,
giving the LLM concrete recovery options instead of a single guess.
suggestion remains the top-ranked candidate for back-compat.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(href:, path:, suggestion: nil, did_you_mean: []) ⇒ BrokenLink

Returns a new instance of BrokenLink.



37
38
39
# File 'app/services/seo/internal_link_validator.rb', line 37

def initialize(href:, path:, suggestion: nil, did_you_mean: [])
  super
end

Instance Attribute Details

#did_you_meanObject (readonly)

Returns the value of attribute did_you_mean

Returns:

  • (Object)

    the current value of did_you_mean



36
37
38
# File 'app/services/seo/internal_link_validator.rb', line 36

def did_you_mean
  @did_you_mean
end

#hrefObject (readonly)

Returns the value of attribute href

Returns:

  • (Object)

    the current value of href



36
37
38
# File 'app/services/seo/internal_link_validator.rb', line 36

def href
  @href
end

#pathObject (readonly)

Returns the value of attribute path

Returns:

  • (Object)

    the current value of path



36
37
38
# File 'app/services/seo/internal_link_validator.rb', line 36

def path
  @path
end

#suggestionObject (readonly)

Returns the value of attribute suggestion

Returns:

  • (Object)

    the current value of suggestion



36
37
38
# File 'app/services/seo/internal_link_validator.rb', line 36

def suggestion
  @suggestion
end