Skip to content

Instantly share code, notes, and snippets.

@augustl
Created January 29, 2009 12:17
Show Gist options
  • Select an option

  • Save augustl/54518 to your computer and use it in GitHub Desktop.

Select an option

Save augustl/54518 to your computer and use it in GitHub Desktop.
Handling extensions to built-in classes
class Hash
def add_a_method
# and so on
end
end
# Include all the files in lib/core_ext
Dir.glob(File.join(Rails.root, 'lib', 'core_ext', '*.rb')).each do |core_ext|
require core_ext
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment