Sha256: 8948478c02e17c8803549f3584eecff33eda377306116f9d8881e09e330032ff

Contents?: true

Size: 266 Bytes

Versions: 5

Compression:

Stored size: 266 Bytes

Contents

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

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

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
mascot-rails-0.1.12 lib/mascot/route_constraint.rb
mascot-rails-0.1.11 lib/mascot/route_constraint.rb
mascot-rails-0.1.10 lib/mascot/route_constraint.rb
mascot-rails-0.1.9 lib/mascot/route_constraint.rb
mascot-rails-0.1.8 lib/mascot/route_constraint.rb