Class: TestBoosters::Files::LeftoverFiles

Inherits:
Object
  • Object
show all
Defined in:
lib/test_boosters/files/leftover_files.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(files) ⇒ LeftoverFiles

Returns a new instance of LeftoverFiles.



7
8
9
# File 'lib/test_boosters/files/leftover_files.rb', line 7

def initialize(files)
  @files = files
end

Instance Attribute Details

#filesObject (readonly)

Returns the value of attribute files.



5
6
7
# File 'lib/test_boosters/files/leftover_files.rb', line 5

def files
  @files
end

Instance Method Details

#select(options = {}) ⇒ Object



11
12
13
14
15
16
# File 'lib/test_boosters/files/leftover_files.rb', line 11

def select(options = {})
  index = options.fetch(:index)
  total = options.fetch(:total)

  file_distribution(total)[index]
end