Sha256: 52e6c4bdbf70b25bcf842e4aa8331be7dfce590c641d430959817b674a81d00e
Contents?: true
Size: 945 Bytes
Versions: 9
Compression:
Stored size: 945 Bytes
Contents
require "pact_broker/api/decorators/base_decorator" require "pact_broker/api/decorators/timestamps" require "pact_broker/api/decorators/pagination_links" require "pact_broker/api/decorators/branch_decorator" module PactBroker module Api module Decorators class PacticipantBranchesDecorator < BaseDecorator collection :entries, as: :branches, embedded: true, :extend => PactBroker::Api::Decorators::BranchDecorator link :self do | user_options | { title: "#{user_options.fetch(:pacticipant).name} branches", href: user_options.fetch(:request_url) } end links "pb:branches" do | user_options | represented.collect do | branch | { name: branch.name, href: branch_url(branch, user_options.fetch(:base_url)) } end end include PaginationLinks end end end end
Version data entries
9 entries across 9 versions & 1 rubygems