Sha256: be1b3a506037fdeab061ef1dbf97c0827268c9133d3921d7f1f0c8a1aeeae43b

Contents?: true

Size: 282 Bytes

Versions: 2

Compression:

Stored size: 282 Bytes

Contents

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

      def matches?(request)
        !!@sitemap.find_by_request_path(request.path)
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mascot-rails-0.1.2 lib/mascot/rails/route_constraint.rb
mascot-rails-0.1.1 lib/mascot/rails/route_constraint.rb