module Temple::Mixins::EngineDSL

def replace(name, *args, &block)

def replace(name, *args, &block)
  name = Class === name ? name.name.to_sym : name
  raise(ArgumentError, 'First argument must be Class or Symbol') unless Symbol === name
  e = element(args, block)
  found = false
  chain.each_with_index do |c, i|
    if c.first == name
      found = true
      chain[i] = e
    end
  end
  raise "#{name} not found" unless found
end