Method: Nokogiri::XML::Node#inner_text!
- Defined in:
- lib/ryoba/nokogiri/xml/node.rb
#inner_text! ⇒ String
Equivalent to .content.strip
, but raises an error if the result is an empty string.
60 61 62 63 64 65 66 |
# File 'lib/ryoba/nokogiri/xml/node.rb', line 60 def content! result = self.content.strip if result.empty? raise Ryoba::Error.new("No text in:\n#{self.to_html}") end result end |