Sha256: bc0f79d72e7156825031cc8b26f50b9073539ad4498fd2bad531c005e8e75978

Contents?: true

Size: 355 Bytes

Versions: 10

Compression:

Stored size: 355 Bytes

Contents

module Clearance
  module Constraints
    class SignedOut
      def matches?(request)
        @request = request
        missing_session? || clearance_session.signed_out?
      end

      private

      def clearance_session
        @request.env[:clearance]
      end

      def missing_session?
        clearance_session.nil?
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
clearance-1.10.1 lib/clearance/constraints/signed_out.rb
clearance-1.9.0 lib/clearance/constraints/signed_out.rb
clearance-1.8.1 lib/clearance/constraints/signed_out.rb
clearance-1.8.0 lib/clearance/constraints/signed_out.rb
clearance-1.7.0 lib/clearance/constraints/signed_out.rb
clearance-1.6.1 lib/clearance/constraints/signed_out.rb
clearance-1.6.0 lib/clearance/constraints/signed_out.rb
clearance-1.5.1 lib/clearance/constraints/signed_out.rb
clearance-1.5.0 lib/clearance/constraints/signed_out.rb
clearance-1.4.3 lib/clearance/constraints/signed_out.rb