Module: Parliament::Grom::Decorator::Group
- Includes:
- Helpers::DateHelper
- Defined in:
- lib/parliament/grom/decorator/group.rb
Overview
Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/Group.
Instance Method Summary collapse
-
#end_date ⇒ DateTime?
Alias groupEndDate with fallback.
-
#formal_body_name ⇒ String
Alias formalBodyName with fallback.
-
#formal_body_remit ⇒ String
Alias formalBodyRemit with fallback.
-
#has_chair? ⇒ Boolean
Alias is_chair with fallback.
-
#joint? ⇒ Boolean
Alias is_joint with fallback.
-
#member_count ⇒ Integer?
Alias member count with fallback.
-
#name ⇒ String
Alias groupName with fallback.
-
#start_date ⇒ DateTime?
Alias groupStartDate with fallback.
Methods included from Helpers::DateHelper
Instance Method Details
#end_date ⇒ DateTime?
Alias groupEndDate with fallback.
53 54 55 |
# File 'lib/parliament/grom/decorator/group.rb', line 53 def end_date @end_date ||= respond_to?(:groupEndDate) ? DateTime.parse(groupEndDate) : nil end |
#formal_body_name ⇒ String
Alias formalBodyName with fallback.
18 19 20 |
# File 'lib/parliament/grom/decorator/group.rb', line 18 def formal_body_name @formal_body_name ||= respond_to?(:formalBodyName) ? formalBodyName : '' end |
#formal_body_remit ⇒ String
Alias formalBodyRemit with fallback.
25 26 27 |
# File 'lib/parliament/grom/decorator/group.rb', line 25 def formal_body_remit @formal_body_remit ||= respond_to?(:formalBodyRemit) ? formalBodyRemit : '' end |
#has_chair? ⇒ Boolean
Alias is_chair with fallback.
46 47 48 |
# File 'lib/parliament/grom/decorator/group.rb', line 46 def has_chair? respond_to?(:formalBodyHasFormalBodyChair) end |
#joint? ⇒ Boolean
Alias is_joint with fallback.
39 40 41 |
# File 'lib/parliament/grom/decorator/group.rb', line 39 def joint? respond_to?(:formalBodyHasLeadHouse) end |
#member_count ⇒ Integer?
Alias member count with fallback.
32 33 34 |
# File 'lib/parliament/grom/decorator/group.rb', line 32 def member_count respond_to?(:count) ? count.to_i : nil end |
#name ⇒ String
Alias groupName with fallback.
60 61 62 |
# File 'lib/parliament/grom/decorator/group.rb', line 60 def name respond_to?(:groupName) ? groupName : '' end |
#start_date ⇒ DateTime?
Alias groupStartDate with fallback.
11 12 13 |
# File 'lib/parliament/grom/decorator/group.rb', line 11 def start_date @start_date ||= respond_to?(:groupStartDate) ? DateTime.parse(groupStartDate) : nil end |