Module: Parliament::Grom::Decorator::WorkPackageableThing
- Includes:
- Helpers::DateHelper
- Defined in:
- lib/parliament/grom/decorator/work_packageable_thing.rb
Overview
Decorator namespace for Grom::Node instances with type: id.parliament.uk/schema/WorkPackageableThing
Instance Method Summary collapse
-
#name ⇒ String
Alias workPackageableThingName with fallback.
-
#time_limit_for_objection_date ⇒ DateTime?
Alias workPackageableThingComingIntoForceDate with fallback.
-
#weblink ⇒ String
Alias workPackageableThingHasWorkPackage with fallback.
-
#work_package ⇒ Grom::Node?
Alias workPackageableThingHasWorkPackage with fallback.
Methods included from Helpers::DateHelper
Instance Method Details
#name ⇒ String
Alias workPackageableThingName with fallback.
10 11 12 |
# File 'lib/parliament/grom/decorator/work_packageable_thing.rb', line 10 def name respond_to?(:workPackageableThingName) ? workPackageableThingName : '' end |
#time_limit_for_objection_date ⇒ DateTime?
Alias workPackageableThingComingIntoForceDate with fallback.
37 38 39 |
# File 'lib/parliament/grom/decorator/work_packageable_thing.rb', line 37 def time_limit_for_objection_date respond_to?(:workPackageableThingTimeLimitForObjectionEndDate) ? DateTime.parse(workPackageableThingTimeLimitForObjectionEndDate) : nil end |
#weblink ⇒ String
Alias workPackageableThingHasWorkPackage with fallback.
25 26 27 |
# File 'lib/parliament/grom/decorator/work_packageable_thing.rb', line 25 def weblink respond_to?(:workPackageableThingHasWorkPackageableThingWebLink) ? workPackageableThingHasWorkPackageableThingWebLink : '' end |
#work_package ⇒ Grom::Node?
Alias workPackageableThingHasWorkPackage with fallback. NB: Currently, a work packageable thing only has one work package
18 19 20 |
# File 'lib/parliament/grom/decorator/work_packageable_thing.rb', line 18 def work_package respond_to?(:workPackageableThingHasWorkPackage) ? workPackageableThingHasWorkPackage.first : nil end |