Skip to content

Instantly share code, notes, and snippets.

@ELLIOTTCABLE
Created October 1, 2008 11:30
Show Gist options
  • Save ELLIOTTCABLE/14066 to your computer and use it in GitHub Desktop.
Save ELLIOTTCABLE/14066 to your computer and use it in GitHub Desktop.
03:26:10 < elliottcable> Hey y'all
03:26:13 -!- ia [[email protected]] has quit [Client Quit]
03:26:25 < elliottcable> Trying to work on some code to manipulate methods; in the process, I need to deal with method_added.
03:27:25 < elliottcable> The problem is depending on whether the method is an instance or a singleton method, I have to use either the singleton method
:method_added, or the singleton method :singleton_method_added
03:27:31 -!- ia [[email protected]] has joined #ruby
03:27:47 < elliottcable> my problem is I can't tell if currently we're working on a singleton or instance method
03:28:14 -!- TopoMorto [[email protected]] has quit [Remote closed the connection]
03:28:16 < elliottcable> is there some way to tell whether the current context is a normal class or a singleton class?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment