class TypeProf::Core::MethodEntity
Attributes
Public Class Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 3 def initialize @builtin = nil @decls = Set[] @overloading_decls = Set[] @defs = Set[] @aliases = {} @method_call_boxes = Set[] end
Public Instance Methods
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 40 def add_alias(node, old_mid) @aliases[node] = old_mid end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 15 def add_decl(decl) if decl.overloading @overloading_decls << decl else @decls << decl end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 31 def add_def(mdef) @defs << mdef self end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 52 def add_run_all_mdefs(genv) @defs.each do |mdef| genv.add_run(mdef) end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 58 def add_run_all_method_call_boxes(genv) @method_call_boxes.each do |box| genv.add_run(box) end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 48 def exist? @builtin || !@decls.empty? || !@defs.empty? end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 44 def remove_alias(node) @aliases.delete(node) || raise end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 23 def remove_decl(decl) if decl.overloading @overloading_decls.delete(decl) || raise else @decls.delete(decl) || raise end end
Source
# File bundled-src/typeprof-0.31.1/lib/typeprof/core/env/method_entity.rb, line 36 def remove_def(mdef) @defs.delete(mdef) || raise end