class TypeProf::Core::AST::SigModuleBaseNode::SigDefNode::SigIncludeNode::SigAliasNode::SigAttrReaderNode::SigAttrWriterNode::SigAttrAccessorNode::SigConstNode::SigTypeAliasNode - typeprof: Ruby Standard Library Documentation

# class TypeProf::Core::AST::SigModuleBaseNode::SigDefNode::SigIncludeNode::SigAliasNode::SigAttrReaderNode::SigAttrWriterNode::SigAttrAccessorNode::SigConstNode::SigTypeAliasNode

### Attributes

cpath[R]
name[R]
params[R]
type[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 399
    def initialize(raw_decl, lenv)
      super(raw_decl, lenv)
      @cpath = AST.resolve_rbs_name(raw_decl.name, lenv)
      @name = @cpath.pop
      @type = AST.create_rbs_type(raw_decl.type, lenv)
      @params = raw_decl.type_params.map {|param| param.name }
    end

### Public Instance Methods

define0(genv) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 409
    def define0(genv)
      @type.define(genv)
      tae = genv.resolve_type_alias(@cpath, @name)
      tae.add_decl(self)
      tae
    end

define_copy(genv) click to toggle source
Calls superclass method `TypeProf::Core::AST::Node#define_copy`

    # File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 416
    def define_copy(genv)
      tae = genv.resolve_type_alias(@cpath, @name)
      tae.add_decl(self)
      tae.remove_decl(@prev_node)
      super(genv)
    end

install0(genv) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 429
    def install0(genv)
      Source.new
    end

undefine0(genv) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/ast/sig_decl.rb, line 423
    def undefine0(genv)
      tae = genv.resolve_type_alias(@cpath, @name)
      tae.remove_decl(self)
      @type.undefine(genv)
    end