Method: ZergXcode::XcodeObject#visit
- Defined in:
- lib/zerg_xcode/objects/xcode_object.rb
#visit(&accept) ⇒ Object
Visits an object’s internal structure.
The given block is called like this:
yield object, parent, key, value
Where
object: the object currently visited (can be a sub-object)
parent: the collection currently visited (an object, hash, or array)
key:
value:
The block can return
false: no recursive visiting for the given value
true: normal recursive visiting for the given value
something else: replace the given value with the return, the recursive
visiting is done on the new value
81 82 83 84 |
# File 'lib/zerg_xcode/objects/xcode_object.rb', line 81 def visit(&accept) visit_hash(@attrs, &accept) self end |