Method: KiMiddleman::Config#to
- Defined in:
- lib/ki_middleman/config.rb
#to(to_format, &block) ⇒ Object
91 92 93 94 95 96 97 98 99 100 101 102 103 104 |
# File 'lib/ki_middleman/config.rb', line 91 def to(to_format, &block) # If 'parsing' then add the block to our lookup table, otherwise # call the appropriate block (evaluation) if @parsing @mapping[@current_from][to_format] = block else #return @evaluation if @evaluation if @format_to_evaluate.to_s == to_format.to_s @evaluation = block.call @format_to_evaluate = nil end @evaluation end end |