Sha256: a926674624798ed3fd385b610ef0f1315fba280c3b6322f184740d86ce44aee3
Contents?: true
Size: 1014 Bytes
Versions: 27
Compression:
Stored size: 1014 Bytes
Contents
module Parliament module Grom module Decorator # Decorator namespace for Grom::Node instances with type: http://id.ukpds.org/schema/HouseSeat module HouseSeat # Alias houseSeatHasHouse with fallback. # # @return [Grom::Node, nil] the house of the Grom::Node or nil. def house respond_to?(:houseSeatHasHouse) ? houseSeatHasHouse.first : nil end # Alias houseSeatHasConstituencyGroup with fallback. # # @return [Grom::Node, nil] the constituency group of the Grom::Node or nil. def constituency respond_to?(:houseSeatHasConstituencyGroup) ? houseSeatHasConstituencyGroup.first : nil end # Alias houseSeatHasSeatIncumbency with fallback. # # @return [Array, Array] the seat incumbencies of the Grom::Node or an empty. def seat_incumbencies respond_to?(:houseSeatHasSeatIncumbency) ? houseSeatHasSeatIncumbency : [] end end end end end
Version data entries
27 entries across 27 versions & 1 rubygems