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_version_url, #pact_url, #pact_url_from_params, #pact_versions_url, #pacticipant_url, #pacticipants_url, #previous_distinct_diff_url, #previous_distinct_pact_version_url, #tag_url, #tags_url, #url_encode, #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