Sha256: acc62b669eeddef21856633262e06e56a8a3ce823eaf2215012b25ad025cdf33

Contents?: true

Size: 241 Bytes

Versions: 6

Compression:

Stored size: 241 Bytes

Contents

module Doorkeeper
  module Models
    module Revocable
      def revoke(clock = Time)
        update_attribute :revoked_at, clock.now
      end

      def revoked?
        !!(revoked_at && revoked_at <= Time.now)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
doorkeeper-4.0.0.rc2 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-4.0.0.rc1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-3.1.0 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-3.0.1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-3.0.0 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-3.0.0.rc2 lib/doorkeeper/models/concerns/revocable.rb