In Files

  • typeprof-0.12.0/lib/typeprof/type.rb

Class/Module Index [+]

Quicksearch

Proc

Attributes

base_type[R]
block_body[R]

Public Class Methods

new(block_body, base_type) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 579
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.12.0/lib/typeprof/type.rb, line 585
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.12.0/lib/typeprof/type.rb, line 606
def include_untyped?(scratch)
  false # XXX: need to check the block signatures recursively
end
            
method_dispatch_info() click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 594
def method_dispatch_info
  @base_type.method_dispatch_info
end
            
screen_name(scratch) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 602
def screen_name(scratch)
  scratch.show_proc_signature([self])
end
            
substitute(subst, depth) click to toggle source
 
               # File typeprof-0.12.0/lib/typeprof/type.rb, line 598
def substitute(subst, depth)
  Proc.new(@block_body.substitute(subst, depth), @base_type)
end