lib/haml_lint/tree/node.rb
# Returns the first node found under the subtree which matches the given
# block.
#
# Returns nil if no node matching the given block was found.
#
# @return [HamlLint::Tree::Node,nil]
Returns the first node found under the subtree which matches the given
block.

Returns nil if no node matching the given block was found.
Returns the first node found under the subtree which matches the given block . Returns nil if no node matching the given block was found .
def find(&block)
      return self if block.call(self)
      children.each do |child|
        if result = child.find(&block)
          return result
        end
      end
      nil 
    end
def find ( & block ) return self if block . call ( self ) children . each do | child | if result = child . find ( & block ) return result end end nil end
Returns the first node found under the subtree which matches the given
block.
Returns the first node found under the subtree which matches the given block .
# Otherwise no matching node was found
None
HamlLint::Tree::Node,nil
block