Class: Rexle::Comment
- Inherits:
-
Object
- Object
- Rexle::Comment
- Defined in:
- lib/rexle.rb
Instance Method Summary collapse
- #add_element(e2) ⇒ Object
- #add_text(t) ⇒ Object
-
#initialize(val = '') ⇒ Comment
constructor
A new instance of Comment.
- #inspect ⇒ Object
- #print ⇒ Object
- #texts ⇒ Object
- #to_s ⇒ Object
Constructor Details
Instance Method Details
#add_element(e2) ⇒ Object
1354 1355 1356 |
# File 'lib/rexle.rb', line 1354 def add_element(e2) @e.add e2 end |
#add_text(t) ⇒ Object
1358 1359 1360 |
# File 'lib/rexle.rb', line 1358 def add_text(t) @e.add_text t end |
#inspect ⇒ Object
1362 1363 1364 |
# File 'lib/rexle.rb', line 1362 def inspect() @value end |
#print ⇒ Object
1366 1367 1368 |
# File 'lib/rexle.rb', line 1366 def print() "<!--%s-->" % @e.root.xpath('//./text()').join end |
#texts ⇒ Object
1370 1371 1372 |
# File 'lib/rexle.rb', line 1370 def texts() @e.texts end |
#to_s ⇒ Object
1374 1375 1376 |
# File 'lib/rexle.rb', line 1374 def to_s() @value end |