Skip to content

Instantly share code, notes, and snippets.

@chad
Created January 18, 2011 19:07
Show Gist options
  • Save chad/784948 to your computer and use it in GitHub Desktop.
Save chad/784948 to your computer and use it in GitHub Desktop.
module Vocal
def speak
puts "#{self} says hello"
end
end
class Object
def ekstend(mod)
class << self
self
end.send(:include, mod)
end
end
animal = "cat"
animal.ekstend Vocal
animal.speak
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment