Sha256: 96894e11c02700f0f4c6041da14ff60f2b2bf529c466da59862da790aafb76aa
Contents?: true
Size: 994 Bytes
Versions: 19
Compression:
Stored size: 994 Bytes
Contents
# typed: strict # frozen_string_literal: true module Tapioca module Gem module Listeners class SorbetHelpers < Base extend T::Sig include Runtime::Reflection private sig { override.params(event: ScopeNodeAdded).void } def on_scope(event) constant = event.constant node = event.node abstract_type = T::Private::Abstract::Data.get(constant, :abstract_type) || T::Private::Abstract::Data.get(singleton_class_of(constant), :abstract_type) node << RBI::Helper.new(abstract_type.to_s) if abstract_type node << RBI::Helper.new("final") if T::Private::Final.final_module?(constant) node << RBI::Helper.new("sealed") if T::Private::Sealed.sealed_module?(constant) end sig { override.params(event: NodeAdded).returns(T::Boolean) } def ignore?(event) event.is_a?(Tapioca::Gem::ForeignScopeNodeAdded) end end end end end
Version data entries
19 entries across 19 versions & 2 rubygems