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.72.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.71.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.70.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.69.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.68.1 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.68.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.67.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.66.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.65.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.64.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.63.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.62.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.61.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.60.1 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.60.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.59.2 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.59.1 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.59.0 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.58.3 lib/pact_broker/api/decorators/tag_decorator.rb
pact_broker-2.58.2 lib/pact_broker/api/decorators/tag_decorator.rb