Class: PathRewrite::Configuration
- Inherits:
-
Object
- Object
- PathRewrite::Configuration
- Defined in:
- lib/path_rewrite/configuration.rb
Instance Method Summary collapse
Instance Method Details
#check_redirect=(value) ⇒ Object
4 5 6 |
# File 'lib/path_rewrite/configuration.rb', line 4 def check_redirect=(value) @check_redirect = value end |
#check_redirect?(request = nil) ⇒ Boolean
8 9 10 11 12 13 14 15 16 |
# File 'lib/path_rewrite/configuration.rb', line 8 def check_redirect?(request=nil) return @check_redirect unless @check_redirect.respond_to?(:call) if @check_redirect.arity == 0 @check_redirect.call else @check_redirect.call request end end |