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
3 4 5 |
# File 'lib/dor/utils/ng_tidy.rb', line 3 def normalize content =~ /\S/ ? content.gsub(/\s+/, ' ').strip : content end |
#normalize! ⇒ Object
7 8 9 |
# File 'lib/dor/utils/ng_tidy.rb', line 7 def normalize! self.content = normalize end |