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
1352 1353 1354 |
# File 'lib/rexle.rb', line 1352 def add_element(e2) @e.add e2 end |
#add_text(t) ⇒ Object
1356 1357 1358 |
# File 'lib/rexle.rb', line 1356 def add_text(t) @e.add_text t end |
#inspect ⇒ Object
1360 1361 1362 |
# File 'lib/rexle.rb', line 1360 def inspect() @value end |
#print ⇒ Object
1364 1365 1366 |
# File 'lib/rexle.rb', line 1364 def print() "<!--%s-->" % @e.root.xpath('//./text()').join end |
#texts ⇒ Object
1368 1369 1370 |
# File 'lib/rexle.rb', line 1368 def texts() @e.texts end |
#to_s ⇒ Object
1372 1373 1374 |
# File 'lib/rexle.rb', line 1372 def to_s() @value end |