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



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

def headline
  'Inconsistent successor'
end

#possible_explanationObject



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

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

#problem?Boolean

Returns:

  • (Boolean)


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

def problem?
  later_holder? && !!successor_qlink && (later.officeholder.qlink != successor_qlink)
end