lib/hatemile/implementation/accessible_css_implementation.rb
##
# Visit and execute a operation in element and descendants.
#
# @param element [Hatemile::Util::Html::HTMLDOMElement] The element.
# @param operation [Method] The operation to be executed.
Visit and execute a operation in element and descendants.
Visit and execute a operation in element and descendants .
def visit(element, operation)
        return unless is_valid_inherit_element?(element)
        if element.has_children_elements?
          element.get_children_elements.each do |child|
            visit(child, operation)
          end
        elsif is_valid_element?(element)
          operation.call(element)
        end
      end
def visit ( element , operation ) return unless is_valid_inherit_element? ( element ) if element . has_children_elements? element . get_children_elements . each do | child | visit ( child , operation ) end elsif is_valid_element? ( element ) operation . call ( element ) end end
Visit and execute a operation in element and descendants.
Visit and execute a operation in element and descendants .
element
None
operation
The operation to be executed.
The operation to be executed .