Sha256: ffd379e9beaace7c5abf379aca631f5250d742063fa767b83c4bc9c57440d1e2

Contents?: true

Size: 514 Bytes

Versions: 25

Compression:

Stored size: 514 Bytes

Contents

require 'roar/json'

module PactBroker

  module Api

    module Decorators

      module Timestamps

        include Roar::JSON

        property :optional_updated_at, as: :updatedAt, exec_context: :decorator, writeable: false
        property :createdAt, getter: lambda { |_|  created_at.xmlschema }, writeable: false

        def optional_updated_at
          if represented.updated_at != represented.created_at
            represented.updated_at.xmlschema
          end
        end
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
pact_broker-1.18.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.18.0.beta.1 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.17.2 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.17.1 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.17.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.16.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.15.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.14.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.13.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.12.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.11.2 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.11.1 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.11.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.10.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.9.3 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.9.2 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.9.1 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.9.0 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.9.0.rc1 lib/pact_broker/api/decorators/timestamps.rb
pact_broker-1.8.1 lib/pact_broker/api/decorators/timestamps.rb