Sha256: 5aff495c987c35aee95c5aab594228ecec3c91fa29e9367cc902fbcbaf707f9a
Contents?: true
Size: 1010 Bytes
Versions: 12
Compression:
Stored size: 1010 Bytes
Contents
require_relative 'base_decorator' require_relative 'version_decorator' module PactBroker module Api module Decorators class VersionsDecorator < BaseDecorator collection :entries, as: :versions, embedded: true, :extend => PactBroker::Api::Decorators::VersionDecorator link :self do | context | { href: context[:resource_url], title: "All versions of the pacticipant #{context[:pacticipant_name]}" } end link :pacticipant do | context | { href: pacticipant_url(context[:base_url], OpenStruct.new(name: context[:pacticipant_name])), title: context[:pacticipant_name] } end links :'versions' do | context | represented.collect do | version | { :href => version_url(context[:base_url], version), :title => version.version_and_updated_date } end end end end end end
Version data entries
12 entries across 12 versions & 1 rubygems