class TypeProf::Core::AST::SigModuleBaseNode::SigDefNode::SigIncludeNode::SigAliasNode

Attributes

instance[R]
new_mid[R]
old_mid[R]
singleton[R]

Public Class Methods

new(raw_decl, lenv) click to toggle source
Calls superclass method TypeProf::Core::AST::Node::new
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 256
def initialize(raw_decl, lenv)
  super(raw_decl, lenv)
  @new_mid = raw_decl.new_name
  @old_mid = raw_decl.old_name
  @singleton = raw_decl.singleton?
  @instance = raw_decl.instance?
end

Public Instance Methods

attrs(= { new_mid:, old_mid:, singleton:, instance: }) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 265
  def attrs = { new_mid:, old_mid:, singleton:, instance: }

  def install0(genv)
    [[@singleton, true], [@instance, false]].each do |enabled, singleton|
      next unless enabled
      @changes.add_method_alias_box(genv, @lenv.cref.cpath, singleton, @new_mid, @old_mid)
    end
    Source.new
  end
end
install0(genv) click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 267
def install0(genv)
  [[@singleton, true], [@instance, false]].each do |enabled, singleton|
    next unless enabled
    @changes.add_method_alias_box(genv, @lenv.cref.cpath, singleton, @new_mid, @old_mid)
  end
  Source.new
end