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
1368 1369 1370 |
# File 'lib/rexle.rb', line 1368 def add_element(e2) @e.add e2 end |
#add_text(t) ⇒ Object
1372 1373 1374 |
# File 'lib/rexle.rb', line 1372 def add_text(t) @e.add_text t end |
#inspect ⇒ Object
1376 1377 1378 |
# File 'lib/rexle.rb', line 1376 def inspect() @value end |
#print ⇒ Object
1380 1381 1382 |
# File 'lib/rexle.rb', line 1380 def print() "<!--%s-->" % @e.root.xpath('//./text()').join end |
#texts ⇒ Object
1384 1385 1386 |
# File 'lib/rexle.rb', line 1384 def texts() @e.texts end |
#to_s ⇒ Object
1388 1389 1390 |
# File 'lib/rexle.rb', line 1388 def to_s() @value end |