class method
self.strip_whitespace!
Ruby on Rails 2.3.18
Since v2.3.18 Last seen in v2.3.18Signature
self.strip_whitespace!(nodes)
No documentation comment.
Parameters
-
nodesreq
Source
# 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
Defined in actionpack/lib/action_controller/assertions/dom_assertions.rb line 4
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionController::Assertions::DomAssertions