module MaybeYouMeant::ObjectExtentions

Extends Object to call a method similar to the one called when the method has not been defined on the object.

Constants

IGNORE_LIST

Not 100% sure what the problem is, but if you start mucking about with the following methods in Ruby 1.9 things go horrible wrong, so we just ignore them. They're likely to be correct anyway.

Public Class Methods

install_instance_methods() click to toggle source
# File lib/maybeyoumeant/object_extensions.rb, line 65
def self.install_instance_methods
  # Add the instance methods to the base object.
  Object.send(:include, InstanceMethods)
end
user_confirmation(nearby) click to toggle source
# File lib/maybeyoumeant/object_extensions.rb, line 15
def self.user_confirmation(nearby)
  Paint["Do you want to call ", :green] +
  Paint[nearby, :green, :bright] +
  Paint[" instead?", :green] +
  " [Y,n]: "
end