Skip to content

Instantly share code, notes, and snippets.

@ryanbriones
Created September 12, 2011 20:49
Show Gist options
  • Save ryanbriones/1212364 to your computer and use it in GitHub Desktop.
Save ryanbriones/1212364 to your computer and use it in GitHub Desktop.
For noms (https://github.com/sdegutis/omnomnom) greater than 42
class String
def method_missing(*args)
if args.first.to_s.match(/omnom/)
noms = args.first.to_s.scan(/nom/).length
self[0..-(noms+1)]
else
super
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment