module TypeFusion

Experimental RBS support (using type sampling data from the type_fusion project).

# sig/type_fusion.rbs

module TypeFusion
  def config: () -> TypeFusion::Config
end

def config

Experimental RBS support (using type sampling data from the type_fusion project).

def config: () -> TypeFusion::Config

This signature was generated using 3 samples from 1 application.

def config
  @config ||= Config.instance
  yield @config if block_given?
  @config
end

def processor

def processor
  @processor ||= TypeFusion::Processor.new(4)
end

def start

def start
  return if Sampler.instance.trace.enabled?
  puts "[TypeFusion] Starting Sampler..."
  Sampler.instance.trace.enable
end

def start_processing

def start_processing
  puts "[TypeFusion] Start processing..."
  processor.start!
end

def stop

def stop
  return unless Sampler.instance.trace.enabled?
  puts "[TypeFusion] Stopping Sampler..."
  Sampler.instance.trace.disable
end

def stop_processing

def stop_processing
  puts "[TypeFusion] Stop processing..."
  processor.stop!
end

def with_sampling

def with_sampling
  start
  yield if block_given?
  stop
end