# File lib/facets/more/methodprobe.rb, line 89 def method_missing(aSym, *args) aSymStr = aSym.to_s # This will happen the first time @ducks[aSymStr] ||= [] #unless @ducks[aSymStr] @ducks[aSymStr] << args.collect { |a| "#{a.class}" } decoy = self.dup @decoys[aSymStr] ||= [] #unless @decoys[aSymStr] @decoys[aSymStr] << decoy # build proxy? #begin # d = <<-HERE # def self.#{aSymStr}(*args) # # This will happen the subsequent times # @ducks["#{aSymStr}"] << args.collect { |a| #{'"#{a.class}"'} } # @ducks["#{aSymStr}"].uniq! # decoy = self.dup # @decoys["#{aSymStr}"] = [] unless @decoys["#{aSymStr}"] # @decoys["#{aSymStr}"] << decoy # decoy # end # HERE # instance_eval d #rescue SyntaxError # puts "This error may be avoidable by returning the failing duck type as the error message." # raise #end decoy end