Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Use method missing to just execute the closest match to the method you tried to call

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Gemfile.lock
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 fuzzy.gemspec
README.md

METHOD MISSING?

NOPE!

Tired of bugs because of typos?

Let fuzzy come to the rescue

class Account
  include Fuzzy

  def pay! other_account, amount
    other_account.balance += amount
    balance -= amount
  end
end

jeff = Account.find 1
a = Account.find 123
a.balance
#=> 10.0

a.paid? jeff, 10
#=> 0.0

What could possibly go wrong?

Nothing! No more pesky exceptions, no more whiny ruby interpreter incapable of making sensible guesses about what you actually meant.

Come on Ruby! Use some common sense.

Something went wrong with that request. Please try again.