Skip to content

Instantly share code, notes, and snippets.

@mentalbrew
mentalbrew / method_and_self.rb
Created April 12, 2012 16:44
def vs define_method
# If I use define_method(:talk) everything works as advertised and it's obviously getting self from the instance
# If I instead use:
# def talk
# puts "Talking..."
# end
# it no worky? the def recognizes self as the Class. Why do they function differently?
module Talkable
def add_talking