Sha256: fda2bbc780fe99c2ece7b911b51ef06006232056bf4d3281c88242cdfac5806b

Contents?: true

Size: 243 Bytes

Versions: 21

Compression:

Stored size: 243 Bytes

Contents

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

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

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
sitepress-rails-0.1.23 lib/sitepress/route_constraint.rb