Skip to content

Instantly share code, notes, and snippets.

@cqr
Created May 24, 2011 21:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cqr/989680 to your computer and use it in GitHub Desktop.
Save cqr/989680 to your computer and use it in GitHub Desktop.
Object#within?
class Object
def within?(range)
range.cover?(self)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment