Sha256: 4b2774b3b870e94e2140790e125a32317da7d4e9ba56f56a440f31c06b67da6e

Contents?: true

Size: 706 Bytes

Versions: 14

Compression:

Stored size: 706 Bytes

Contents

module Parliament
  module Grom
    module Decorator
      # Decorator namespace for Grom::Node instances with type: https://id.parliament.uk/schema/Procedure
      module Procedure
        # Alias procedureName with fallback.
        #
        # @return [String, String] the name of the Grom::Node or an empty string.
        def name
          respond_to?(:procedureName) ? procedureName : ''
        end

        # Alias procedureHasWorkPackage with fallback.
        #
        # @return [Array, Array] an array of WorkPackage Grom::Nodes or an empty array.
        def work_packages
          respond_to?(:procedureHasWorkPackage) ? procedureHasWorkPackage : []
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
parliament-grom-decorators-0.32.1 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.32.0 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.31.1 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.31.0 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.31.0.pre.rc lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.30.0 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.29.0 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.7 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.6 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.5 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.4 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.3 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.2 lib/parliament/grom/decorator/procedure.rb
parliament-grom-decorators-0.27.1 lib/parliament/grom/decorator/procedure.rb