method

strip_whitespace!

rails latest stable - Class: ActionController::Assertions::DomAssertions

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v2.3.8) is shown here.

strip_whitespace!(nodes)
public

No documentation available.

# File actionpack/lib/action_controller/assertions/dom_assertions.rb, line 4
      def self.strip_whitespace!(nodes)
        nodes.reject! do |node|
          if node.is_a?(HTML::Text)
            node.content.strip!
            node.content.empty?
          else
            strip_whitespace! node.children
            false
          end
        end
      end