test/unit/vagrant/action/builder_test.rb
def appender_proc(data)
    result = Proc.new { |env| env[:data] << data }

    # Define a to_s on it for helpful output
    result.define_singleton_method(:to_s) do
      "<Appender: #{data}>"
    end

    result
  end
# This returns a proc that can be used with the builder
# that simply appends data to an array in the env.
This returns a proc that can be used with the builder
that simply appends data to an array in the env.
This returns a proc that can be used with the builder that simply appends data to an array in the env .
def appender_proc(data)
    result = Proc.new { |env| env[:data] << data }
    result.define_singleton_method(:to_s) do
      "<Appender: #{data}>"
    end
    result
  end
def appender_proc ( data ) result = Proc . new { | env | env [ :data ] << data } result . define_singleton_method ( :to_s ) do "<Appender: #{data}>" end result end
This returns a proc that can be used with the builder
that simply appends data to an array in the env.
This returns a proc that can be used with the builder that simply appends data to an array in the env .
# Define a to_s on it for helpful output
data