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.8/lib/typeprof/type.rb, line 628
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.8/lib/typeprof/type.rb, line 634
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.8/lib/typeprof/type.rb, line 655
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.8/lib/typeprof/type.rb, line 643
def method_dispatch_info
  @base_type.method_dispatch_info
end
screen_name(scratch) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 651
def screen_name(scratch)
  scratch.show_proc_signature([self])
end
substitute(subst, depth) click to toggle source
# File typeprof-0.21.8/lib/typeprof/type.rb, line 647
def substitute(subst, depth)
  Proc.new(@block_body.substitute(subst, depth), @base_type)
end