Sha256: 9a454c5539f290c478eb7b816ce1fc40091324baad62f4933aaef1ac6bef7def

Contents?: true

Size: 728 Bytes

Versions: 42

Compression:

Stored size: 728 Bytes

Contents

require_relative "base_decorator"
require_relative "pact_pacticipant_decorator"
require_relative "timestamps"

module PactBroker
  module Api
    module Decorators
      class LabelDecorator < BaseDecorator

        property :name

        include Timestamps

        link :self do | options |
          {
            title: "Label",
            name: represented.name,
            href: label_url(represented, options[:base_url])
          }
        end

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

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
pact_broker-2.109.1 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.109.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.108.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.107.1 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.107.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.107.0.beta.1 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.106.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.105.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.104.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.103.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.102.2 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.102.1 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.102.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.101.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.100.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.99.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.98.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.97.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.96.0 lib/pact_broker/api/decorators/label_decorator.rb
pact_broker-2.95.1 lib/pact_broker/api/decorators/label_decorator.rb