Class: PactBroker::Models::Group

Inherits:
Array
  • Object
show all
Defined in:
lib/pact_broker/models/group.rb

Instance Method Summary collapse

Constructor Details

#initialize(*relationships) ⇒ Group

Returns a new instance of Group.



7
8
9
# File 'lib/pact_broker/models/group.rb', line 7

def initialize *relationships
  self.concat relationships.flatten
end

Instance Method Details

#==(other) ⇒ Object



11
12
13
# File 'lib/pact_broker/models/group.rb', line 11

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

#include_pacticipant?(pacticipant) ⇒ Boolean

Returns:

  • (Boolean)


15
16
17
# File 'lib/pact_broker/models/group.rb', line 15

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