Sha256: a2dc59af519bbfd591479c59d58f09abc11895e49090a1f83d3a2320645c7915

Contents?: true

Size: 968 Bytes

Versions: 51

Compression:

Stored size: 968 Bytes

Contents

require_relative 'base_decorator'
require_relative 'pact_pacticipant_decorator'
require_relative 'timestamps'

module PactBroker

  module Api

    module Decorators

      class TagDecorator < BaseDecorator

        property :name

        include Timestamps

        link :self do | options |
          {
            title: 'Tag',
            name: represented.name,
            href: tag_url(options[:base_url], represented)
          }
        end

        link :version do | options |
          {
            title: 'Version',
            name: represented.version.number,
            href: version_url(options.fetch(:base_url), represented.version)
          }
        end

        link :pacticipant do | options |
          {
            title: 'Pacticipant',
            name: represented.version.pacticipant.name,
            href: pacticipant_url(options.fetch(:base_url), represented.version.pacticipant)
          }
        end

      end
    end
  end
end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
pact_broker-2.43.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.42.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.41.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.40.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.39.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.38.1 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.38.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.37.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.36.1 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.36.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.35.0 lib/pact_broker/api/decorators/tag_decorator.rb