Sha256: ff9658d9822a32c46864e4f7b2cd400ebb213419f330322f13c52ffe130bf8ad

Contents?: true

Size: 860 Bytes

Versions: 8

Compression:

Stored size: 860 Bytes

Contents

module Parliament
  module Grom
    module Decorator
      # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/WorkdPackagedThing
      module WorkPackagedThing
        # Alias workPackagedThingHasWorkPackagedThingWebLink with fallback.
        #
        # @return [String, String] a web link to view the statutory instrument Grom::Node or an empty string.
        def web_link
          respond_to?(:workPackagedThingHasWorkPackagedThingWebLink) ? workPackagedThingHasWorkPackagedThingWebLink : ''
        end

        # Alias workPackagedThingHasWorkPackage with fallback.
        #
        # @return [Grom::Node, nil] a work package Grom::Node or nil.
        def work_package
          respond_to?(:workPackagedThingHasWorkPackage) ? workPackagedThingHasWorkPackage.first : nil
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
parliament-grom-decorators-0.32.1 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.32.0 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.31.1 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.31.0 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.31.0.pre.rc lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.30.0 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.29.0 lib/parliament/grom/decorator/work_packaged_thing.rb
parliament-grom-decorators-0.27.7 lib/parliament/grom/decorator/work_packaged_thing.rb