def erb(options = {})
      source = options.delete(:source)
      dest   = options.delete(:dest)
      mode   = options.delete(:mode) || 0644
      vars   = options.delete(:vars) || {}

      raise "Missing required option `:source'!" unless source
      raise "Missing required option `:dest'!"   unless dest

      locations, source_path = find_file("config/templates", source)

      unless source_path
        raise MissingTemplate.new(source, locations)
      end

      erbs << source_path

      block "Render erb `#{source}'" do
        render_template(source_path,
          destination: dest,
          mode:        mode,
          variables:   vars
        )
      end
    end
def erb(options = {})
      source = options.delete(:source)
      dest   = options.delete(:dest)
      mode   = options.delete(:mode) || 0644
      vars   = options.delete(:vars) || {}

      raise "Missing required option `:source'!" unless source
      raise "Missing required option `:dest'!"   unless dest

      locations, source_path = find_file("config/templates", source)

      unless source_path
        raise MissingTemplate.new(source, locations)
      end

      erbs << source_path

      block "Render erb `#{source}'" do
        render_template(source_path,
          destination: dest,
          mode:        mode,
          variables:   vars
        )
      end
    end
Render the erb template by the given name. This method will search all
 possible locations for an erb template (such as {Config#software_gems}).

 @example
   erb source: 'example.erb',
       dest:   '/path/on/disk/to/render'

 @example
   erb source: 'example.erb',
       dest:   '/path/on/disk/to/render',
       vars:   { foo: 'bar' },
       mode:   '0755'

 @param [Hash] options
   the list of options

 @option options [String] :source
   the name of the patch to apply
 @option options [String] :dest
   the path on disk where the erb should be rendered
 @option options [Hash] :vars
   the list of variables to pass to the ERB rendering
 @option options [String] :mode
   the file mode for the rendered template (default varies by system)

 @return (see #command)