Method: Impression::Resource#each
- Defined in:
- lib/impression/resource.rb
#each(&block) ⇒ Impression::Resource
Iterates over the resource and any of its sub-resources, passing each to the given block.
72 73 74 75 76 |
# File 'lib/impression/resource.rb', line 72 def each(&block) block.(self) @children.values.each { |c| c.each(&block) } self end |