Class: PactBroker::Models::Group
- Inherits:
-
Array
- Object
- Array
- PactBroker::Models::Group
- Defined in:
- lib/pact_broker/models/group.rb
Instance Method Summary collapse
- #==(other) ⇒ Object
- #include_pacticipant?(pacticipant) ⇒ Boolean
-
#initialize(*relationships) ⇒ Group
constructor
A new instance of Group.
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
15 16 17 |
# File 'lib/pact_broker/models/group.rb', line 15 def include_pacticipant? pacticipant any? { | relationship | relationship.include? pacticipant } end |