Method: WhatMethods::MethodFinder.show

Defined in:
lib/what_methods.rb

.show(anObject, expectedResult, *args, &block) ⇒ Object

Pretty-prints the results of the previous method



71
72
73
74
75
76
77
# File 'lib/what_methods.rb', line 71

def self.show( anObject, expectedResult, *args, &block)
  find( anObject, expectedResult, *args, &block).each { |name|
    print "#{anObject.inspect}.#{name}" 
    print "(" + args.map { |o| o.inspect }.join(", ") + ")" unless args.empty?
    puts " == #{expectedResult.inspect}" 
  }
end