Module: Temple::Mixins::ControlFlowDispatcher Private
- Included in:
- Dispatcher
- Defined in:
- lib/temple/mixins/dispatcher.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Instance Method Summary collapse
- #on_block(code, content) ⇒ Object private
- #on_case(arg, *cases) ⇒ Object private
- #on_cond(*cases) ⇒ Object private
- #on_if(condition, *cases) ⇒ Object private
Instance Method Details
#on_block(code, content) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
34 35 36 |
# File 'lib/temple/mixins/dispatcher.rb', line 34 def on_block(code, content) [:block, code, compile(content)] end |
#on_case(arg, *cases) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 |
# File 'lib/temple/mixins/dispatcher.rb', line 30 def on_case(arg, *cases) [:case, arg, *cases.map {|condition, exp| [condition, compile(exp)] }] end |
#on_cond(*cases) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
38 39 40 |
# File 'lib/temple/mixins/dispatcher.rb', line 38 def on_cond(*cases) [:cond, *cases.map {|condition, exp| [condition, compile(exp)] }] end |
#on_if(condition, *cases) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
26 27 28 |
# File 'lib/temple/mixins/dispatcher.rb', line 26 def on_if(condition, *cases) [:if, condition, *cases.compact.map {|e| compile(e) }] end |