module Temple::Mixins::EngineDSL

def replace(name, *args, &block)

def replace(name, *args, &block)
  name = chain_name(name)
  e = chain_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
  chain_modified!
end