Module Kernel
In: lib/prelude.rb

Methods

Public Instance methods

Method object for the caller of the currently executing method

[Source]

     # File lib/prelude.rb, line 118
118:   def caller_method
119:     name = (Kernel.caller[1] =~ /`([^']*)'/ and $1)
120:     eval "self.method(\"#{name}\".to_sym)", binding
121:   end

Shuts up Ruby’s warning.

[Source]

     # File lib/prelude.rb, line 124
124:   def silence_warnings
125:     old_verbose, $VERBOSE = $VERBOSE, nil
126:     yield
127:   ensure
128:     $VERBOSE = old_verbose
129:   end

Method object for currently executing method

[Source]

     # File lib/prelude.rb, line 112
112:   def this_method
113:     name = (Kernel.caller[0] =~ /`([^']*)'/ and $1)
114:     eval "self.method(\"#{name}\".to_sym)", binding
115:   end