Class: Waw::Routing::DSL
Overview
The DSL for routing blocks
Instance Method Summary collapse
-
#feedback(*args) ⇒ Object
Feedback routing execution.
-
#form_validation_feedback(*args) ⇒ Object
Form validation feedback routing execution.
-
#initialize(routing) ⇒ DSL
constructor
Creates a DSL instance for some routing instance.
-
#javascript(*args) ⇒ Object
Javascript routing execution.
-
#redirect(*args) ⇒ Object
Redirect routing execution.
-
#refresh(*args) ⇒ Object
Refresh routing execution.
-
#upon(*action_results) ⇒ Object
Evaluates the block as routing execution and installs it under all provided action results.
Constructor Details
#initialize(routing) ⇒ DSL
Creates a DSL instance for some routing instance
7 8 9 |
# File 'lib/waw/routing/dsl.rb', line 7 def initialize(routing) @routing = routing end |
Instance Method Details
#feedback(*args) ⇒ Object
Feedback routing execution
19 20 21 |
# File 'lib/waw/routing/dsl.rb', line 19 def feedback(*args) Waw::Routing::Feedback.new(*args) end |
#form_validation_feedback(*args) ⇒ Object
Form validation feedback routing execution
24 25 26 |
# File 'lib/waw/routing/dsl.rb', line 24 def form_validation_feedback(*args) Waw::Routing::FormValidationFeedback.new(*args) end |
#javascript(*args) ⇒ Object
Javascript routing execution
39 40 41 |
# File 'lib/waw/routing/dsl.rb', line 39 def javascript(*args) Waw::Routing::Javascript.new(*args) end |
#redirect(*args) ⇒ Object
Redirect routing execution
34 35 36 |
# File 'lib/waw/routing/dsl.rb', line 34 def redirect(*args) Waw::Routing::Redirect.new(*args) end |
#refresh(*args) ⇒ Object
Refresh routing execution
29 30 31 |
# File 'lib/waw/routing/dsl.rb', line 29 def refresh(*args) Waw::Routing::Refresh.new(*args) end |
#upon(*action_results) ⇒ Object
Evaluates the block as routing execution and installs it under all provided action results
13 14 15 16 |
# File 'lib/waw/routing/dsl.rb', line 13 def upon(*action_results) raise ArgumentError, "Missing routing block on upon", caller unless block_given? @routing.add_rules(action_results, yield) end |