Method: Less::Node::Element#each

Defined in:
lib/less/engine/nodes/element.rb

#each(path = [], &blk) ⇒ Object

Traverse the whole tree, returning each leaf (recursive)



175
176
177
178
179
180
181
182
183
# File 'lib/less/engine/nodes/element.rb', line 175

def each path = [], &blk
  elements.each do |element|
    path << element
    yield element, path if element.leaf?
    element.each path, &blk
    path.pop
  end
  self
end