class TypeProf::Core::AST::DefNode::AliasNode
Attributes
new_mid[R]
old_mid[R]
Public Class Methods
new(raw_node, lenv)
click to toggle source
Calls superclass method
TypeProf::Core::AST::Node::new
# File typeprof-0.30.1/lib/typeprof/core/ast/method.rb, line 295 def initialize(raw_node, lenv) super(raw_node, lenv) @new_mid = AST.create_node(raw_node.new_name, lenv) @old_mid = AST.create_node(raw_node.old_name, lenv) end
Public Instance Methods
install0(genv)
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/method.rb, line 305 def install0(genv) @new_mid.install(genv) @old_mid.install(genv) if @new_mid.is_a?(SymbolNode) && @old_mid.is_a?(SymbolNode) new_mid = @new_mid.lit old_mid = @old_mid.lit box = @changes.add_method_alias_box(genv, @lenv.cref.cpath, false, new_mid, old_mid) box.ret else Source.new(genv.nil_type) end end
subnodes(= { new_mid:, old_mid: })
click to toggle source
# File typeprof-0.30.1/lib/typeprof/core/ast/method.rb, line 303 def subnodes = { new_mid:, old_mid: } def install0(genv) @new_mid.install(genv) @old_mid.install(genv) if @new_mid.is_a?(SymbolNode) && @old_mid.is_a?(SymbolNode) new_mid = @new_mid.lit old_mid = @old_mid.lit box = @changes.add_method_alias_box(genv, @lenv.cref.cpath, false, new_mid, old_mid) box.ret else Source.new(genv.nil_type) end end end