Class: Ovec::TextManipulator

Inherits:
Object
  • Object
show all
Defined in:
lib/ovec/text_manipulator.rb

Direct Known Subclasses

Tier

Instance Method Summary collapse

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