Class: Nokogiri::XML::Text

Inherits:
Object
  • Object
show all
Defined in:
lib/pacer-xml/nokogiri_node.rb

Instance Method Summary collapse

Instance Method Details

#inspectObject



6
7
8
9
10
11
12
# File 'lib/pacer-xml/nokogiri_node.rb', line 6

def inspect
  if text =~ /\A\s*\Z/
    "#<(whitespace)>"
  else
    "#<Text #{ text }>"
  end
end

#tree(_ = nil) ⇒ Object



2
3
4
# File 'lib/pacer-xml/nokogiri_node.rb', line 2

def tree(_ = nil)
  text unless text =~ /\A\s*\Z/
end