Class: Ovec::TextManipulator
- Inherits:
-
Object
- Object
- Ovec::TextManipulator
- Defined in:
- lib/ovec/text_manipulator.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#bind(chunks) ⇒ Object
Subclasses, note: once you change the length of a chunk, delimiters will no longer be correct.
Instance Method Details
#bind(chunks) ⇒ Object
Subclasses, note: once you change the length of a chunk, delimiters will no longer be correct.
5 6 7 8 9 10 11 12 13 |
# File 'lib/ovec/text_manipulator.rb', line 5 def bind(chunks) @chunks = chunks @delimiters = [0] chunks.each do |chunk| @delimiters << @delimiters.last + chunk.length end _rejoin end |