Class: WikidataPositionHistory::Check::MissingPredecessor

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

Overview

Is there a ‘replaces’ but no previous 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



113
114
115
# File 'lib/wikidata_position_history/checks.rb', line 113

def headline
  'Inconsistent predecessor'
end

#possible_explanationObject



117
118
119
# File 'lib/wikidata_position_history/checks.rb', line 117

def possible_explanation
  "#{current.item} has a {{P|1365}} of #{predecessor}, but does not follow anyone here"
end

#problem?Boolean

Returns:

  • (Boolean)


109
110
111
# File 'lib/wikidata_position_history/checks.rb', line 109

def problem?
  predecessor && !earlier_holder?
end