module Dekoden::Helpers

Public Class Methods

wrap(decorators, *args, blk, &block) click to toggle source
# File lib/dekoden.rb, line 91
def self.wrap(decorators, *args, blk, &block)
  if decorator = decorators.first
    decorator.call(*args, blk) do |*args, blk|
      wrap(decorators.drop(1), *args, blk, &block)
    end
  else
    block.call(*args, blk)
  end
end