method

recurse_proc

Importance_0
v1_9_1_378 - Show latest stable - 0 notes - Class: JSON
recurse_proc(result, &proc) public

No documentation

This method has no description. You can help the Ruby community by adding new notes.

Hide source
# File ext/json/lib/json/common.rb, line 261
  def recurse_proc(result, &proc)
    case result
    when Array
      result.each { |x| recurse_proc x, &proc }
      proc.call result
    when Hash
      result.each { |x, y| recurse_proc x, &proc; recurse_proc y, &proc }
      proc.call result
    else
      proc.call result
    end
  end
Register or log in to add new notes.