Sha256: 8ba467d318efa939adb8b86db088e075182e26ced7b91e89f23ecfa35b00c213

Contents?: true

Size: 249 Bytes

Versions: 14

Compression:

Stored size: 249 Bytes

Contents

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

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
doorkeeper-2.2.2 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-3.0.0.rc1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.2.1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.2.0 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.1.4 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.1.3 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.1.2 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.1.1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.1.0 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.0.1 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.0.0 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.0.0.rc3 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.0.0.rc2 lib/doorkeeper/models/concerns/revocable.rb
doorkeeper-2.0.0.alpha1 lib/doorkeeper/models/concerns/revocable.rb