Class: WikidataPositionHistory::Check::WrongSuccessor

Inherits:
WikidataPositionHistory::Check show all
Defined in:
lib/wikidata_position_history/checks.rb

Overview

Does the ‘replaced by’ match the next item in the list?

Instance Method Summary collapse

Methods inherited from WikidataPositionHistory::Check

#explanation, #initialize

Constructor Details

This class inherits a constructor from WikidataPositionHistory::Check

Instance Method Details

#headlineObject



128
129
130
# File 'lib/wikidata_position_history/checks.rb', line 128

def headline
  'Inconsistent successor'
end

#possible_explanationObject



132
133
134
# File 'lib/wikidata_position_history/checks.rb', line 132

def possible_explanation
  "#{current.item} has a {{P|1366}} of #{successor}, but is followed by #{later.item} here"
end

#problem?Boolean

Returns:

  • (Boolean)


124
125
126
# File 'lib/wikidata_position_history/checks.rb', line 124

def problem?
  later_holder? && !!successor && (later.item != successor)
end