Module: Parliament::Grom::Decorator::GovRegisterGovernmentOrganisation
- Includes:
- Helpers::DateHelper
- Defined in:
- lib/parliament/grom/decorator/gov_register_government_organisation.rb
Overview
Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/GovRegisterGovernmentOrganisation.
Instance Method Summary collapse
-
#end_date ⇒ DateTime?
Alias groupEndDate 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.
18 19 20 |
# File 'lib/parliament/grom/decorator/gov_register_government_organisation.rb', line 18 def end_date @end_date ||= respond_to?(:groupEndDate) ? DateTime.parse(groupEndDate) : nil end |
#name ⇒ String
Alias groupName with fallback.
25 26 27 |
# File 'lib/parliament/grom/decorator/gov_register_government_organisation.rb', line 25 def name respond_to?(:groupName) ? groupName : '' end |
#start_date ⇒ DateTime?
Alias groupStartDate with fallback.
11 12 13 |
# File 'lib/parliament/grom/decorator/gov_register_government_organisation.rb', line 11 def start_date @start_date ||= respond_to?(:groupStartDate) ? DateTime.parse(groupStartDate) : nil end |