Class: Nokogiri::XML::Text
- Inherits:
-
Object
- Object
- Nokogiri::XML::Text
- Defined in:
- lib/dor/utils/ng_tidy.rb
Instance Method Summary collapse
Instance Method Details
#normalize ⇒ Object
4 5 6 |
# File 'lib/dor/utils/ng_tidy.rb', line 4 def normalize content =~ /\S/ ? content.gsub(/\s+/, ' ').strip : content end |
#normalize! ⇒ Object
8 9 10 |
# File 'lib/dor/utils/ng_tidy.rb', line 8 def normalize! self.content = normalize end |