lib/message_queue/options_helper.rb
# Internal: Recursively compute the value of a Hash if it responds to :call
#
# options - The Hash options to compute value for
#
# Returns the Hash with values computed if responding to :call
Recursively compute the value of a Hash if it responds to :call
options - The Hash options to compute value for

Returns the Hash with values computed if responding to :call
Recursively compute the value of a Hash if it responds to : call options - The Hash options to compute value for Returns the Hash with values computed if responding to : call
def compute_values(options = {})
    options.each do |k, v|
      if v.is_a?(Hash)
        compute_values(v)
      else
        options[k] = v.call if v.respond_to?(:call)
      end
    end
  end
def compute_values ( options = { } ) options . each do | k , v | if v . is_a? ( Hash ) compute_values ( v ) else options [ k ] = v . call if v . respond_to? ( :call ) end end end
Internal: Recursively compute the value of a Hash if it responds to :call
options - The Hash options to compute value for
Internal : Recursively compute the value of a Hash if it responds to : call options - The Hash options to compute value for
options
<not_specific>