Class: PactBroker::Domain::Group

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

Instance Method Summary collapse

Constructor Details

#initialize(*index_items) ⇒ Group

Returns a new instance of Group.



5
6
7
# File 'lib/pact_broker/domain/group.rb', line 5

def initialize *index_items
  self.concat index_items.flatten
end

Instance Method Details

#==(other) ⇒ Object



9
10
11
# File 'lib/pact_broker/domain/group.rb', line 9

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

#include_pacticipant?(pacticipant) ⇒ Boolean

Returns:

  • (Boolean)


13
14
15
# File 'lib/pact_broker/domain/group.rb', line 13

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