Module: Tarquinn
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/tarquinn.rb,
lib/tarquinn/version.rb,
lib/tarquinn/condition.rb,
lib/tarquinn/controller.rb,
lib/tarquinn/class_methods.rb,
lib/tarquinn/request_handler.rb,
lib/tarquinn/redirection_config.rb,
lib/tarquinn/redirection_handler.rb,
lib/tarquinn/condition/proc_runner.rb,
lib/tarquinn/condition/method_caller.rb,
lib/tarquinn/request_handler_builder.rb,
lib/tarquinn/condition/action_checker.rb
Overview
Concern adding methods for easy redirection controll
Defined Under Namespace
Modules: ClassMethods Classes: Condition, Controller, RedirectionConfig, RedirectionHandler, RequestHandler, RequestHandlerBuilder
Constant Summary collapse
- VERSION =
'0.3.0'
Class Method Summary collapse
-
.redirection_rule(redirection, *methods, &block) ⇒ Array<Tarquinn::Condition>
Creates a redirection rule.
-
.redirector_builder ⇒ RequestHandlerBuilder
Retruns the RequestHandlerBuilder.
-
.skip_redirection(redirection, *actions) ⇒ Array<Tarquinn::Condition>
Attaches a condition to skip a redirection based on route (controller action).
-
.skip_redirection_rule(redirection, *methods, &block) ⇒ Array<Tarquinn::Condition>
Attaches conditions to skip a redirection.
Class Method Details
.redirection_rule(redirection, *methods, &block) ⇒ Array<Tarquinn::Condition>
Creates a redirection rule
The rule name defines which method will be called when checking the path of redirection
|
# File 'lib/tarquinn.rb', line 22
|
.redirector_builder ⇒ RequestHandlerBuilder
Retruns the RequestHandlerBuilder
RequestHandlerBuilder will Carry all the configurations and will create one RequestHandler for each request
57 58 59 |
# File 'lib/tarquinn.rb', line 57 included do before_action :perform_redirection end |
.skip_redirection(redirection, *actions) ⇒ Array<Tarquinn::Condition>
Attaches a condition to skip a redirection based on route (controller action)
When any of the skip rules is met the redirection is skipped
|
# File 'lib/tarquinn.rb', line 31
|
.skip_redirection_rule(redirection, *methods, &block) ⇒ Array<Tarquinn::Condition>
Attaches conditions to skip a redirection
Methods and blocks are ran and if any returns true, the redirec is skipped
|
# File 'lib/tarquinn.rb', line 40
|