Skip to content

Instantly share code, notes, and snippets.

@cowboy-cod3r
Created December 27, 2013 06:15
Show Gist options
  • Save cowboy-cod3r/8143265 to your computer and use it in GitHub Desktop.
Save cowboy-cod3r/8143265 to your computer and use it in GitHub Desktop.
Ruby: Open Classes The concpet of extending existing classes in ruby (including those in the standard library) is called Open Classes. Here is an example.
# Extend the String class with a new method called my_new_method
class String
def my_new_method()
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment