class TypeProf::Type::Proc

Attributes

base_type[R]
block_body[R]

Public Class Methods

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

Public Instance Methods

consistent?(other) click to toggle source
# File typeprof-0.21.2/lib/typeprof/type.rb, line 631
def consistent?(other)
  case other
  when Type::Proc
    @block_body.consistent?(other.block_body)
  else
    self == other
  end
end
include_untyped?(scratch) click to toggle source
# File typeprof-0.21.2/lib/typeprof/type.rb, line 652
def include_untyped?(scratch)
  false # XXX: need to check the block signatures recursively
end
method_dispatch_info() click to toggle source
# File typeprof-0.21.2/lib/typeprof/type.rb, line 640
def method_dispatch_info
  @base_type.method_dispatch_info
end
screen_name(scratch) click to toggle source
# File typeprof-0.21.2/lib/typeprof/type.rb, line 648
def screen_name(scratch)
  scratch.show_proc_signature([self])
end
substitute(subst, depth) click to toggle source
# File typeprof-0.21.2/lib/typeprof/type.rb, line 644
def substitute(subst, depth)
  Proc.new(@block_body.substitute(subst, depth), @base_type)
end