Sha256: a0de849f38edd2621d471fee249b052dcce890ebd93b5fb0c808d881873142eb

Contents?: true

Size: 577 Bytes

Versions: 4

Compression:

Stored size: 577 Bytes

Contents

# frozen_string_literal: true

module Checkpoint
  class Resource
    # Specialized Resource type to represent all entities of a any/all types.
    # This is used for zone-/system-wide grants or checks.
    class AllOfAnyType < Resource
      # Create a wildcard Resource.
      #
      # Because type and ID are static, this takes no parameters
      def initialize
        @entity = AnyEntity.new
      end

      # The special ALL type
      def type
        Resource::ALL
      end

      # The special ALL id
      def id
        Resource::ALL
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
checkpoint-1.1.3 lib/checkpoint/resource/all_of_any_type.rb
checkpoint-1.1.2 lib/checkpoint/resource/all_of_any_type.rb
checkpoint-1.1.1 lib/checkpoint/resource/all_of_any_type.rb
checkpoint-1.1.0 lib/checkpoint/resource/all_of_any_type.rb