lib/sixarm_ruby_ramp/pairable.rb
# Call block once for each key-value pair in self,
# passing the value as a parameter to the block,
# and mapping it to a result.
#
# @example
#   h = {"a" => "b"}
#   h.map_value{|value| value.upcase }
#   => {"a" => "B"}
#
# @return [self.class] a new object with the existing keys and mapped values.
#
Call block once for each key-value pair in self,
passing the value as a parameter to the block,
and mapping it to a result.
Call block once for each key - value pair in self passing the value as a parameter to the block and mapping it to a result .
def map_value
    result = self.class.new
    keys.each{|key| result[key] = yield self[key]}
    result
  end
def map_value result = self . class . new keys . each { | key | result [ key ] = yield self [ key ] } result end
Call block once for each key-value pair in self,
passing the value as a parameter to the block,
and mapping it to a result.
Call block once for each key - value pair in self passing the value as a parameter to the block and mapping it to a result .
a new object with the existing keys and mapped values.
a new object with the existing keys and mapped values .
self.class
example
None