Module: StrongRoutes
- Defined in:
- lib/strong_routes.rb,
lib/strong_routes/allow.rb,
lib/strong_routes/config.rb,
lib/strong_routes/matcher.rb,
lib/strong_routes/railtie.rb,
lib/strong_routes/version.rb,
lib/strong_routes/route_mapper.rb
Defined Under Namespace
Classes: Allow, Config, Matcher, Railtie, RouteMapper
Constant Summary
collapse
- VERSION =
"2.0.1"
Class Method Summary
collapse
Class Method Details
.allowed?(route) ⇒ Boolean
10
11
12
|
# File 'lib/strong_routes.rb', line 10
def self.allowed?(route)
config.route_matchers.any? { |route_matcher| route_matcher =~ route }
end
|
.config ⇒ Object
14
15
16
|
# File 'lib/strong_routes.rb', line 14
def self.config
@config ||= Config.new
end
|
.response ⇒ Object
18
19
20
|
# File 'lib/strong_routes.rb', line 18
def self.response
Rack::Response[config.status, config., config.content]
end
|