Module: Parliament::Decorators::HouseSeat

Defined in:
lib/parliament/decorators/house_seat.rb

Overview

Decorator namespace for Grom::Node instances with type: id.ukpds.org/schema/HouseSeat

Instance Method Summary collapse

Instance Method Details

#constituencyGrom::Node?

Alias houseSeatHasConstituencyGroup with fallback.


15
16
17
# File 'lib/parliament/decorators/house_seat.rb', line 15

def constituency
  respond_to?(:houseSeatHasConstituencyGroup) ? houseSeatHasConstituencyGroup.first : nil
end

#houseGrom::Node?

Alias houseSeatHasHouse with fallback.


8
9
10
# File 'lib/parliament/decorators/house_seat.rb', line 8

def house
  respond_to?(:houseSeatHasHouse) ? houseSeatHasHouse.first : nil
end

#seat_incumbenciesArray

Alias houseSeatHasSeatIncumbency with fallback.


22
23
24
# File 'lib/parliament/decorators/house_seat.rb', line 22

def seat_incumbencies
  respond_to?(:houseSeatHasSeatIncumbency) ? houseSeatHasSeatIncumbency : []
end