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)

Instance Method Details

- (Object) on_block(code, content)

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.



33
34
35
# File 'lib/temple/mixins/dispatcher.rb', line 33

def on_block(code, content)
  [:block, code, compile(content)]
end

- (Object) on_case(arg, *cases)

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.



29
30
31
# File 'lib/temple/mixins/dispatcher.rb', line 29

def on_case(arg, *cases)
  [:case, arg, *cases.map {|condition, exp| [condition, compile(exp)] }]
end

- (Object) on_cond(*cases)

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.



37
38
39
# File 'lib/temple/mixins/dispatcher.rb', line 37

def on_cond(*cases)
  [:cond, *cases.map {|condition, exp| [condition, compile(exp)] }]
end

- (Object) on_if(condition, *cases)

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.



25
26
27
# File 'lib/temple/mixins/dispatcher.rb', line 25

def on_if(condition, *cases)
  [:if, condition, *cases.compact.map {|e| compile(e) }]
end