class WikidataPositionHistory::MandateRow

Represents a single row returned from the Mandates query

Public Instance Methods

acting?() click to toggle source
# File lib/sparql/mandates_query.rb, line 86
def acting?
  nature == 'Q4676846'
end
end_date() click to toggle source
# File lib/sparql/mandates_query.rb, line 94
def end_date
  date_from(:end_date, :end_precision)
end
nature() click to toggle source

TODO: switch to item_from

# File lib/sparql/mandates_query.rb, line 82
def nature
  QueryService::WikidataItem.new(row.dig(:nature, :value)).id
end
next() click to toggle source

TODO: switch to item_from

# File lib/sparql/mandates_query.rb, line 77
def next
  QueryService::WikidataItem.new(row.dig(:next, :value)).qlink
end
officeholder() click to toggle source
# File lib/sparql/mandates_query.rb, line 63
def officeholder
  item_from(:item)
end
ordinal() click to toggle source
# File lib/sparql/mandates_query.rb, line 59
def ordinal
  raw(:ordinal)
end
party() click to toggle source
# File lib/sparql/mandates_query.rb, line 67
def party
  item_from(:party)
end
prev() click to toggle source

TODO: switch to item_from

# File lib/sparql/mandates_query.rb, line 72
def prev
  QueryService::WikidataItem.new(row.dig(:prev, :value)).qlink
end
start_date() click to toggle source
# File lib/sparql/mandates_query.rb, line 90
def start_date
  date_from(:start_date, :start_precision)
end