Class: Retest::Command::Rake

Inherits:
Object
  • Object
show all
Defined in:
lib/retest/command/rake.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(all:, file_system: FileSystem) ⇒ Rake

Returns a new instance of Rake.



6
7
8
9
# File 'lib/retest/command/rake.rb', line 6

def initialize(all:, file_system: FileSystem)
  @file_system = file_system
  @all = all
end

Instance Attribute Details

#allObject (readonly)

Returns the value of attribute all.



4
5
6
# File 'lib/retest/command/rake.rb', line 4

def all
  @all
end

#file_systemObject (readonly)

Returns the value of attribute file_system.



4
5
6
# File 'lib/retest/command/rake.rb', line 4

def file_system
  @file_system
end

Instance Method Details

#format_batch(*files) ⇒ Object



16
17
18
# File 'lib/retest/command/rake.rb', line 16

def format_batch(*files)
  files.size > 1 ? "\"{#{files.join(',')}}\"" : files.first
end

#to_sObject



11
12
13
14
# File 'lib/retest/command/rake.rb', line 11

def to_s
  return "#{root_command} TEST=<test>" unless all
  root_command
end