Sha256: 091ef36688fecbdbe49aaa52ded0be1eaa243604a1185f0178197715c38e202e

Contents?: true

Size: 241 Bytes

Versions: 2

Compression:

Stored size: 241 Bytes

Contents

module Mascot
  # Route constraint for rails routes.rb file.
  class RouteConstraint
    def initialize(root: Mascot.configuration.root)
      @root = root
    end

    def matches?(request)
      !!@root.get(request.path)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mascot-rails-0.1.15 lib/mascot/route_constraint.rb
mascot-rails-0.1.14 lib/mascot/route_constraint.rb