Module: Sorbet::Private::GemGeneratorTracepoint

Includes:
StepInterface
Defined in:
lib/gem-generator-tracepoint.rb,
lib/gem-generator-tracepoint/tracer.rb,
lib/gem-generator-tracepoint/tracepoint_serializer.rb

Defined Under Namespace

Classes: ClassDefinition, TracepointSerializer, Tracer

Constant Summary collapse

OUTPUT =
'sorbet/rbi/gems/'

Class Method Summary collapse

Class Method Details

.main(output_dir = OUTPUT) ⇒ Object



37
38
39
40
41
42
43
44
# File 'lib/gem-generator-tracepoint.rb', line 37

def self.main(output_dir = OUTPUT)
  trace_results = Tracer.trace do
    Sorbet::Private::RequireEverything.require_everything
  end

  FileUtils.rm_r(output_dir) if Dir.exist?(output_dir)
  TracepointSerializer.new(trace_results).serialize(output_dir)
end

.output_fileObject



46
47
48
# File 'lib/gem-generator-tracepoint.rb', line 46

def self.output_file
  OUTPUT
end