Class: CoverRage::Launcher

Inherits:
Object
  • Object
show all
Defined in:
lib/cover_rage/launcher.rb

Class Method Summary collapse

Class Method Details

.start(**kwargs) ⇒ Object



10
11
12
13
14
15
16
17
18
19
20
21
22
23
# File 'lib/cover_rage/launcher.rb', line 10

def self.start(**kwargs)
  if @recorder.nil?
    @recorder = CoverRage::Recorder.new(
      store: CoverRage::Config.store,
      root_path: CoverRage::Config.root_path,
      **kwargs
    )
  end
  @recorder.start
  return unless Process.respond_to?(:_fork)
  return if Process.singleton_class < CoverRage::ForkHook

  Process.singleton_class.prepend(CoverRage::ForkHook)
end