Sha256: b57e7a00bdef10ca19ef135981e72fdab4c885d3d8f630f63b5759bfd24cf218

Contents?: true

Size: 274 Bytes

Versions: 2

Compression:

Stored size: 274 Bytes

Contents

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

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
mascot-rails-0.1.5 lib/mascot/route_constraint.rb
mascot-rails-0.1.4 lib/mascot/route_constraint.rb