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.
407 408 409 410 411 |
# File 'lib/card/diff.rb', line 407 def initialize list @list = list @index = 0 @chunk_index = 0 end |
Instance Method Details
#next ⇒ Object
417 418 419 420 421 422 423 424 |
# File 'lib/card/diff.rb', line 417 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
413 414 415 |
# File 'lib/card/diff.rb', line 413 def word_step @chunk_index += 1 end |