Class: PactBroker::Api::Decorators::PactCollectionDecorator

Inherits:
BaseDecorator
  • Object
show all
Includes:
PactBrokerUrls, Roar::JSON::HAL
Defined in:
lib/pact_broker/api/decorators/pact_collection_decorator.rb

Instance Method Summary collapse

Methods included from PactBrokerUrls

#hal_browser_url, #latest_pact_url, #latest_pacts_url, #latest_verifications_for_consumer_version_url, #latest_version_url, #new_verification_url, #pact_url, #pact_url_from_params, #pact_version_url, #pact_versions_url, #pacticipant_url, #pacticipants_url, #previous_distinct_diff_url, #previous_distinct_pact_version_url, #tag_url, #tags_url, #url_encode, #verification_publication_url, #verification_url, #version_url, #versions_url, #webhook_execution_url, #webhook_url, #webhooks_for_pact_url, #webhooks_url

Instance Method Details

#create_representable_pact(pact) ⇒ Object



22
23
24
# File 'lib/pact_broker/api/decorators/pact_collection_decorator.rb', line 22

def create_representable_pact pact
  PactBroker::Api::Decorators::RepresentablePact.new(pact)
end

#pactsObject



18
19
20
# File 'lib/pact_broker/api/decorators/pact_collection_decorator.rb', line 18

def pacts
  represented.collect{ | pact | create_representable_pact(pact) }
end