Class: Hashira::Duplication::Sequence
- Inherits:
-
Object
- Object
- Hashira::Duplication::Sequence
- Defined in:
- lib/hashira/duplication/sequence.rb
Constant Summary collapse
- MIN_STATEMENTS =
1- MAX_STATEMENTS =
12- LIST_RUN =
3
Instance Method Summary collapse
- #fragments ⇒ Object
-
#initialize(file, statements) ⇒ Sequence
constructor
A new instance of Sequence.
Constructor Details
#initialize(file, statements) ⇒ Sequence
Returns a new instance of Sequence.
10 11 12 13 |
# File 'lib/hashira/duplication/sequence.rb', line 10 def initialize(file, statements) @file = file @statements = statements end |
Instance Method Details
#fragments ⇒ Object
15 16 17 18 19 |
# File 'lib/hashira/duplication/sequence.rb', line 15 def fragments return [] if listing? lengths.flat_map { |length| (length) } end |