Skip to content

Instantly share code, notes, and snippets.

@tarnfeld
Created March 10, 2012 12:10
Show Gist options
  • Select an option

  • Save tarnfeld/2011244 to your computer and use it in GitHub Desktop.

Select an option

Save tarnfeld/2011244 to your computer and use it in GitHub Desktop.
module Thing
def say_message string
self.message = string
self.say
end
module_function :say_message
def message= string
@message = string
end
def speak
puts "#{@message}"
end
class <<self; end;
end
Thing.say_message "Hello World"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment