Skip to content

Instantly share code, notes, and snippets.

@jish
Created January 3, 2011 23:02
Show Gist options
  • Select an option

  • Save jish/764133 to your computer and use it in GitHub Desktop.

Select an option

Save jish/764133 to your computer and use it in GitHub Desktop.
Monkey patching a library with custom functionality
class Chef
def some_method
puts 'This method does something'
end
end
class Chef
def some_method
puts 'new functionality'
end
end
require 'chef'
require 'chef_patch'
Chef.new.some_method # => new functionality
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment