Skip to content

Instantly share code, notes, and snippets.

@CodeMonkeySteve
Created May 7, 2010 22:10
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 CodeMonkeySteve/394055 to your computer and use it in GitHub Desktop.
Save CodeMonkeySteve/394055 to your computer and use it in GitHub Desktop.
class String
def possessive
str = self + "'"
str += 's' unless %r{(s|se|z|ze|ce|x|xe)$}i.match(self)
str
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment