Class: LibXML::XML::XPath::Object

Inherits:
BasicObject
Defined in:
lib/libxml/ext/string.rb

Instance Method Summary collapse

Instance Method Details

#to_s(sep = ' | ') ⇒ Object



47
48
49
50
51
52
53
54
55
56
# File 'lib/libxml/ext/string.rb', line 47

def to_s(sep = ' | ')
  res = []

  each { |node|
    content = node.to_s(sep)
    res << content unless content.empty?
  }

  res.join(sep)
end