Sha256: 1ae5fb274b4434a0a43f96c532c6198740879d50d2d2393dee213b4b1379a302

Contents?: true

Size: 351 Bytes

Versions: 53

Compression:

Stored size: 351 Bytes

Contents

module PactBroker
  module Domain
    class Group < Array

      def initialize *relationships
        self.concat relationships.flatten
      end

      def == other
        Group === other && super
      end

      def include_pacticipant? pacticipant
        any? { | relationship | relationship.include? pacticipant }
      end

    end
  end
end

Version data entries

53 entries across 53 versions & 1 rubygems

Version Path
pact_broker-2.9.0 lib/pact_broker/domain/group.rb
pact_broker-2.9.0.beta.5 lib/pact_broker/domain/group.rb
pact_broker-2.8.0.beta.5 lib/pact_broker/domain/group.rb
pact_broker-2.8.0.beta.4 lib/pact_broker/domain/group.rb
pact_broker-2.7.0.beta.3 lib/pact_broker/domain/group.rb
pact_broker-2.7.0.beta.2 lib/pact_broker/domain/group.rb
pact_broker-2.7.0.beta.1 lib/pact_broker/domain/group.rb
pact_broker-2.6.0 lib/pact_broker/domain/group.rb
pact_broker-2.5.1 lib/pact_broker/domain/group.rb
pact_broker-2.5.0 lib/pact_broker/domain/group.rb
pact_broker-2.4.2 lib/pact_broker/domain/group.rb
pact_broker-2.4.1 lib/pact_broker/domain/group.rb
pact_broker-2.4.0 lib/pact_broker/domain/group.rb
pact_broker-2.3.0 lib/pact_broker/domain/group.rb
pact_broker-2.2.0 lib/pact_broker/domain/group.rb
pact_broker-2.1.1 lib/pact_broker/domain/group.rb
pact_broker-2.1.0 lib/pact_broker/domain/group.rb
pact_broker-2.0.5 lib/pact_broker/domain/group.rb
pact_broker-2.0.4 lib/pact_broker/domain/group.rb
pact_broker-2.0.3 lib/pact_broker/domain/group.rb