Class: PactBroker::Integrations::Repository
- Inherits:
-
Object
- Object
- PactBroker::Integrations::Repository
- Defined in:
- lib/pact_broker/integrations/repository.rb
Instance Method Summary collapse
Instance Method Details
#create_for_pact(consumer_id, provider_id) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/pact_broker/integrations/repository.rb', line 6 def create_for_pact(consumer_id, provider_id) if Integration.where(consumer_id: consumer_id, provider_id: provider_id).empty? Integration.new( consumer_id: consumer_id, provider_id: provider_id, created_at: Sequel.datetime_class.now ).insert_ignore end nil end |
#delete(consumer_id, provider_id) ⇒ Object
17 18 19 |
# File 'lib/pact_broker/integrations/repository.rb', line 17 def delete(consumer_id, provider_id) Integration.where(consumer_id: consumer_id, provider_id: provider_id).delete end |