Module: Parliament::Grom::Decorator::Party
- Defined in:
- lib/parliament/grom/decorator/party.rb
Overview
Decorator namespace for Grom::Node instances with type: id.ukpds.org/schema/Party
Instance Method Summary collapse
-
#member_count ⇒ Integer?
Alias count with fallback.
-
#name ⇒ String
Alias partyName with fallback.
-
#party_memberships ⇒ Array
Alias partyHasPartyMembership with fallback.
Instance Method Details
#member_count ⇒ Integer?
Alias count with fallback.
23 24 25 |
# File 'lib/parliament/grom/decorator/party.rb', line 23 def member_count respond_to?(:count) ? count.to_i : nil end |
#name ⇒ String
Alias partyName with fallback.
9 10 11 |
# File 'lib/parliament/grom/decorator/party.rb', line 9 def name respond_to?(:partyName) ? partyName : '' end |
#party_memberships ⇒ Array
Alias partyHasPartyMembership with fallback.
16 17 18 |
# File 'lib/parliament/grom/decorator/party.rb', line 16 def party_memberships respond_to?(:partyHasPartyMembership) ? partyHasPartyMembership : [] end |