public_method_defined?

mod.public_method_defined?(symbol) â true or false Instance Public methods Returns true if the named public method is defined by mod (or its included modules and, if mod is a class, its ancestors). module A def method1() end end class B protected def method2() end end class C < B include A def method3() end end A.method_defined? :method1 #=> true C.public_method_defined? "method1" #=> true C.public_method_defined? "method2" #=> false C.met

rake_extension

rake_extension(method) Instance Public methods Check for an existing method in the current class before extending. IF the method already exists, then a warning is printed and the extension is not added. Otherwise the block is yielded and any definitions in the block will take effect. Usage: class String rake_extension("xyz") do def xyz ... end end end

rake_original_const_missing

rake_original_const_missing(const_name) Instance Public methods Rename the original handler to make it available. const_missing

remove_class_variable

remove_class_variable(sym) â obj Instance Public methods Removes the definition of the sym, returning that constant's value. class Dummy @@var = 99 puts @@var remove_class_variable(:@@var) p(defined? @@var) end produces: 99 nil

to_s

mod.to_s â string Instance Public methods Return a string representing this module or class. For basic classes and modules, this is the name. For singletons, we show information on the thing we're attached to as well. inspect

yaml_as

yaml_as(url) Instance Public methods Alias for: psych_yaml_as

new

new(monitor) Class Public methods

broadcast

broadcast() Instance Public methods Wakes up all threads waiting for this lock.

signal

signal() Instance Public methods Wakes up the first thread in line waiting for this lock.

wait

wait(timeout = nil) Instance Public methods Releases the lock held in the associated monitor and waits; reacquires the lock on wakeup. If timeout is given, this method returns after timeout seconds passed, even if no other thread doesn't signal.