Class: Spoom::Coverage::SnapshotPrinter
- Extended by:
- T::Sig
- Defined in:
- lib/spoom/coverage/snapshot.rb
Instance Attribute Summary
Attributes inherited from Printer
Instance Method Summary collapse
Methods inherited from Printer
#colorize, #dedent, #indent, #initialize, #print, #print_colored, #printl, #printn, #printt
Constructor Details
This class inherits a constructor from Spoom::Printer
Instance Method Details
#print_snapshot(snapshot) ⇒ Object
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 |
# File 'lib/spoom/coverage/snapshot.rb', line 78 def print_snapshot(snapshot) methods = snapshot.methods_with_sig + snapshot.methods_without_sig calls = snapshot.calls_typed + snapshot.calls_untyped if snapshot.version_static || snapshot.version_runtime printl("Sorbet static: #{snapshot.version_static}") if snapshot.version_static printl("Sorbet runtime: #{snapshot.version_runtime}") if snapshot.version_runtime printn end printl("Content:") indent printl("files: #{snapshot.files}") printl("modules: #{snapshot.modules}") printl("classes: #{snapshot.classes - snapshot.singleton_classes}") printl("methods: #{methods}") dedent printn printl("Sigils:") print_map(snapshot.sigils, snapshot.files) printn printl("Methods:") methods_map = { "with signature" => snapshot.methods_with_sig, "without signature" => snapshot.methods_without_sig, } print_map(methods_map, methods) printn printl("Calls:") calls_map = { "typed" => snapshot.calls_typed, "untyped" => snapshot.calls_untyped, } print_map(calls_map, calls) end |