Module: ForcedSelection

Included in:
Retest::Program
Defined in:
lib/retest/program/forced_selection.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#selected_test_filesObject (readonly)

Returns the value of attribute selected_test_files.



2
3
4
# File 'lib/retest/program/forced_selection.rb', line 2

def selected_test_files
  @selected_test_files
end

Instance Method Details

#force_selection(test_files) ⇒ Object



16
17
18
# File 'lib/retest/program/forced_selection.rb', line 16

def force_selection(test_files)
  @selected_test_files = Array(test_files)
end

#forced_selection?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'lib/retest/program/forced_selection.rb', line 8

def forced_selection?
  !@selected_test_files.empty?
end

#initialize_forced_selection(value = []) ⇒ Object



4
5
6
# File 'lib/retest/program/forced_selection.rb', line 4

def initialize_forced_selection(value = [])
  @selected_test_files = value
end

#reset_selectionObject



12
13
14
# File 'lib/retest/program/forced_selection.rb', line 12

def reset_selection
  @selected_test_files = []
end