Top Level Namespace
Defined Under Namespace
Modules: Methodsolver
Instance Method Summary collapse
Instance Method Details
#solve(&block) ⇒ Object
68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
# File 'lib/methodsolver.rb', line 68 def solve(&block) data = Methodsolver.call(metadata: true, &block) object, found = data[:reciever], data[:results] if block.respond_to? :method_source puts "Found #{found.count} methods for #{block.method_source.strip}" else puts "Found #{found.count} methods for ##{data[:placeholder]}" end found.map do |symbol| method = object.method(symbol) puts "- #{method.owner}\e[32m##{method.name}\e[0m" end puts end |