Method: HTree::Text.concat
- Defined in:
- lib/htree/text.rb
.concat(*args) ⇒ Object
HTree::Text.concat returns a text which is concatenation of arguments.
An argument should be one of follows.
-
String
-
HTree::Text
-
HTree::Location which points HTree::Text
102 103 104 105 106 107 108 109 110 111 112 113 |
# File 'lib/htree/text.rb', line 102 def Text.concat(*args) rcdata = '' args.each {|arg| arg = arg.to_node if HTree::Location === arg if Text === arg rcdata << arg.rcdata else rcdata << arg.gsub(/&/, '&') end } new_internal rcdata end |