Class: Hashira::Duplication::Sequence

Inherits:
Object
  • Object
show all
Defined in:
lib/hashira/duplication/sequence.rb

Constant Summary collapse

MIN_STATEMENTS =
1
MAX_STATEMENTS =
12
LIST_RUN =
3

Instance Method Summary collapse

Constructor Details

#initialize(file, statements) ⇒ Sequence

Returns a new instance of Sequence.



8
9
10
11
# File 'lib/hashira/duplication/sequence.rb', line 8

def initialize(file, statements)
  @file = file
  @statements = statements
end

Instance Method Details

#fragmentsObject



13
# File 'lib/hashira/duplication/sequence.rb', line 13

def fragments = segments.flat_map { windows(it) }