class TypeProf::Type::Symbol

Attributes

base_type[R]
sym[R]

Public Class Methods

new(sym, base_type) click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 661
def initialize(sym, base_type)
  @sym = sym
  @base_type = base_type
end

Public Instance Methods

consistent?(other) click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 672
def consistent?(other)
  case other
  when Symbol
    @sym == other.sym
  else
    @base_type.consistent?(other)
  end
end
inspect() click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 668
def inspect
  "Type::Symbol[#{ @sym ? @sym.inspect : "(dynamic symbol)" }, #{ @base_type.inspect }]"
end
method_dispatch_info() click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 689
def method_dispatch_info
  @base_type.method_dispatch_info
end
screen_name(scratch) click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 681
def screen_name(scratch)
  if @sym
    @sym.inspect
  else
    @base_type.screen_name(scratch)
  end
end
substitute(_subst, _depth) click to toggle source
# File typeprof-0.21.11/lib/typeprof/type.rb, line 693
def substitute(_subst, _depth)
  self # dummy
end