Module: Taka::DOM::Text
- Defined in:
- lib/taka/dom/text.rb
Instance Method Summary collapse
Instance Method Details
#attributes ⇒ Object
4 5 6 |
# File 'lib/taka/dom/text.rb', line 4 def attributes nil end |
#nodeName ⇒ Object
8 9 10 |
# File 'lib/taka/dom/text.rb', line 8 def nodeName '#text' end |
#splitText(index) ⇒ Object
12 13 14 15 16 17 18 19 20 |
# File 'lib/taka/dom/text.rb', line 12 def splitText index if index < 0 || index > length raise DOMException.new(DOMException::INDEX_SIZE_ERR) end left = text[0..(index - 1)] right = text[index..-1] self.content = left self end |