Class: Card::Diff::DiffBuilder::LCS::ExcludeeIterator
- Defined in:
- lib/card/diff.rb
Instance Method Summary collapse
-
#initialize(list) ⇒ ExcludeeIterator
constructor
A new instance of ExcludeeIterator.
- #next ⇒ Object
- #word_step ⇒ Object
Constructor Details
#initialize(list) ⇒ ExcludeeIterator
Returns a new instance of ExcludeeIterator.
406 407 408 409 410 |
# File 'lib/card/diff.rb', line 406 def initialize list @list = list @index = 0 @chunk_index = 0 end |
Instance Method Details
#next ⇒ Object
416 417 418 419 420 421 422 423 |
# File 'lib/card/diff.rb', line 416 def next if @index < @list.size and @list[@index][:chunk_index] == @chunk_index res = @list[@index] @index += 1 @chunk_index +=1 res end end |
#word_step ⇒ Object
412 413 414 |
# File 'lib/card/diff.rb', line 412 def word_step @chunk_index += 1 end |