class TypeProf::Core::AST::SigModuleBaseNode::SigDefNode::SigIncludeNode::SigPrependNode::SigAliasNode::SigAttrReaderNode::SigAttrWriterNode::SigAttrAccessorNode::SigConstNode::SigInstanceVariableNode
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 479 def initialize(raw_decl, lenv, class_scope) super(raw_decl, lenv) @var = raw_decl.name @cpath = lenv.cref.cpath @class_scope = class_scope @type = AST.create_rbs_type(raw_decl.type, lenv) end
Calls superclass method
TypeProf::Core::AST::Node::new
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 489 def attrs = { cpath:, class_scope: } def define0(genv) @type.define(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod end def define_copy(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod.remove_decl(@prev_node) super(genv) end def undefine0(genv) genv.resolve_ivar(cpath, @class_scope, @var).remove_decl(self) @type.undefine(genv) end def install0(genv) box = @changes.add_type_read_box(genv, @type) @changes.add_edge(genv, box.ret, @static_ret.vtx) box.ret end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 491 def define0(genv) @type.define(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 498 def define_copy(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod.remove_decl(@prev_node) super(genv) end
Calls superclass method
TypeProf::Core::AST::Node#define_copy
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 510 def install0(genv) box = @changes.add_type_read_box(genv, @type) @changes.add_edge(genv, box.ret, @static_ret.vtx) box.ret end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 488 def subnodes = { type: } def attrs = { cpath:, class_scope: } def define0(genv) @type.define(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod end def define_copy(genv) mod = genv.resolve_ivar(cpath, @class_scope, @var) mod.add_decl(self) mod.remove_decl(@prev_node) super(genv) end def undefine0(genv) genv.resolve_ivar(cpath, @class_scope, @var).remove_decl(self) @type.undefine(genv) end def install0(genv) box = @changes.add_type_read_box(genv, @type) @changes.add_edge(genv, box.ret, @static_ret.vtx) box.ret end end class SigClassVariableNode < Node def initialize(raw_decl, lenv) super(raw_decl, lenv) @var = raw_decl.name @cpath = lenv.cref.cpath @type = AST.create_rbs_type(raw_decl.type, lenv) end attr_reader :cpath, :type def subnodes = { type: } def attrs = { cpath: } def define0(genv) @type.define(genv) cvar = genv.resolve_cvar(cpath, @var) cvar.add_decl(self) cvar end def define_copy(genv) cvar = genv.resolve_cvar(cpath, @var) cvar.add_decl(self) cvar.remove_decl(@prev_node) super(genv) end def undefine0(genv) genv.resolve_cvar(cpath, @var).remove_decl(self) @type.undefine(genv) end def install0(genv) box = @changes.add_type_read_box(genv, @type) @changes.add_edge(genv, box.ret, @static_ret.vtx) box.ret end end class SigGlobalVariableNode < Node def initialize(raw_decl, lenv) super(raw_decl, lenv) @var = raw_decl.name @type = AST.create_rbs_type(raw_decl.type, lenv) end attr_reader :cpath, :type def subnodes = { type: } def attrs = { cpath: } def define0(genv) @type.define(genv) mod = genv.resolve_gvar(@var) mod.add_decl(self) mod end def define_copy(genv) mod = genv.resolve_gvar(@var) mod.add_decl(self) mod.remove_decl(@prev_node) super(genv) end def undefine0(genv) genv.resolve_gvar(@var).remove_decl(self) @type.undefine(genv) end def install0(genv) box = @changes.add_type_read_box(genv, @type) @changes.add_edge(genv, box.ret, @static_ret.vtx) box.ret end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/ast/sig_decl.rb, line 505 def undefine0(genv) genv.resolve_ivar(cpath, @class_scope, @var).remove_decl(self) @type.undefine(genv) end