class RBS::Prototype::Runtime::Todo
Public Class Methods
(builder: DefinitionBuilder) → void
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/runtime.rb, line 11 def initialize(builder:) @builder = builder end
Public Instance Methods
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/runtime.rb, line 50 def skip_constant?(module_name:, name:) namespace = Namespace.new(path: module_name.split('::').map(&:to_sym), absolute: true) @builder.env.constant_decl?(TypeName.new(namespace: namespace, name: name)) end
(module_name: TypeName, method: UnboundMethod, accessibility: Definition::accessibility) → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/runtime.rb, line 37 def skip_instance_method?(module_name:, method:, accessibility:) return false unless @builder.env.module_class_entry(module_name.absolute!) method_definition = @builder.build_instance(module_name.absolute!).methods[method.name] return false unless method_definition return false unless method_definition.defs.any? do |type_def| type_def.implemented_in&.relative!.to_s == method.owner.to_s end method_definition.accessibility == accessibility end
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/runtime.rb, line 15 def skip_mixin?(type_name:, module_name:, mixin_class:) return false unless @builder.env.module_class_entry(type_name.absolute!) return false unless @builder.env.module_class_entry(module_name.absolute!) mixin_decls(type_name).any? do |decl| decl.instance_of?(mixin_class) && decl.name == module_name.absolute! end end
(module_name: TypeName, method: UnboundMethod, accessibility: Definition::accessibility) → bool
Source
# File vendor/bundle/ruby/4.0.0/gems/rbs-4.0.3/lib/rbs/prototype/runtime.rb, line 24 def skip_singleton_method?(module_name:, method:, accessibility:) return false unless @builder.env.module_class_entry(module_name.absolute!) method_definition = @builder.build_singleton(module_name.absolute!).methods[method.name] return false unless method_definition return false unless method_definition.defs.any? do |type_def| type_def.implemented_in&.relative!.to_s == method.owner.to_s.delete_prefix("#<Class:").delete_suffix(">") end method_definition.accessibility == accessibility end