Sha256: f5f06e8b3f473badd146b24803bedfc28e0e2361339d1f193643d28714a6bf92

Contents?: true

Size: 352 Bytes

Versions: 10

Compression:

Stored size: 352 Bytes

Contents

# frozen_string_literal: true

module Stenographer
  module RoutingConstraints
    class ViewerOnly
      def matches?(request)
        request.session[:init] = true

        if Stenographer.viewer.respond_to?(:call)
          Stenographer.viewer.call(request.session)
        else
          Stenographer.viewer
        end
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
stenographer-rails-0.7.4 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.7.3 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.7.1 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.7.0 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.5 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.4 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.3 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.2 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.1 lib/stenographer/routing_constraints/viewer_only.rb
stenographer-rails-0.6.0 lib/stenographer/routing_constraints/viewer_only.rb