Skip to content

Instantly share code, notes, and snippets.

@nordringrayhide
Created January 1, 2012 20:02
Show Gist options
  • Save nordringrayhide/1548197 to your computer and use it in GitHub Desktop.
Save nordringrayhide/1548197 to your computer and use it in GitHub Desktop.
module Chef
class Recipe
def search
puts 'A'
end
end
end
module LocalSearch
def search
puts 'B'
end
end
module Chef
class Recipe
include LocalSearch
# undef :search
end
end
Chef::Recipe.new.search
class Chef::Recipe
def search
puts 'C'
end
end
Chef::Recipe.new.search
# => A
# => C
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment