class TypeProf::Core::MethodEntity - typeprof: Ruby Standard Library Documentation

# class TypeProf::Core::MethodEntity

### Attributes

aliases[R]
builtin[RW]
decls[R]
defs[R]
method_call_boxes[R]

### Public Class Methods

new() click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 3
    def initialize
      @builtin = nil
      @decls = Set[]
      @defs = Set[]
      @aliases = {}
      @method_call_boxes = Set[]
    end

### Public Instance Methods

add_alias(node, old_mid) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 31
    def add_alias(node, old_mid)
      @aliases[node] = old_mid
    end

add_decl(decl) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 14
    def add_decl(decl)
      @decls << decl
    end

add_def(mdef) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 22
    def add_def(mdef)
      @defs << mdef
      self
    end

add_run_all_mdefs(genv) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 43
    def add_run_all_mdefs(genv)
      @defs.each do |mdef|
        genv.add_run(mdef)
      end
    end

add_run_all_method_call_boxes(genv) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 49
    def add_run_all_method_call_boxes(genv)
      @method_call_boxes.each do |box|
        genv.add_run(box)
      end
    end

exist?() click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 39
    def exist?
      @builtin || !@decls.empty? || !@defs.empty?
    end

remove_alias(node) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 35
    def remove_alias(node)
      @aliases.delete(node) || raise
    end

remove_decl(decl) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 18
    def remove_decl(decl)
      @decls.delete(decl) || raise
    end

remove_def(mdef) click to toggle source

    # File typeprof-0.30.1/lib/typeprof/core/env/method_entity.rb, line 27
    def remove_def(mdef)
      @defs.delete(mdef) || raise
    end