each

each(&block) Instance Public methods Iterate over each node in the tree. Yields each node to block depth first.

delete_slaves 2

delete_slaves(*args) Instance Public methods

next_migration_number

next_migration_number(dirname) Instance Public methods Implement the required interface for Rails::Generators::Migration.

dump

dump(obj, anIO = nil, limit = nil) Instance Public methods Dumps obj as a JSON string, i.e. calls generate on the object and returns the result. If anIO (an IO-like object or an object that responds to the write method) was given, the resulting JSON is written to it. If the number of nested arrays or objects exceeds limit, an ArgumentError exception is raised. This argument is similar (but not exactly the same!) to the limit argument in Marshal.dump. The default options for the gen

instance_method

mod.instance_method(symbol) â unbound_method Instance Public methods Returns an UnboundMethod representing the given instance method in mod. class Interpreter def do_a() print "there, "; end def do_d() print "Hello "; end def do_e() print "!\n"; end def do_v() print "Dave"; end Dispatcher = { "a" => instance_method(:do_a), "d" => instance_method(:do_d), "e" => instance_method(:do_e), "v" => instance_method(:do_v) } def interpret(

new

new(tree, parent_item = '', idx = 'end', keys = {}) Class Public methods

stop 2

stop() Instance Public methods Stop the server

protected_method_defined?

mod.protected_method_defined?(symbol) â true or false Instance Public methods Returns true if the named protected 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.protected_method_defined? "method1" #=> false C.protected_method_defined? "method2" #=

dump

dump( obj [, anIO] , limit=-1 ) â anIO Class Public methods Serializes obj and all descendant objects. If anIO is specified, the serialized data will be written to it, otherwise the data will be returned as a String. If limit is specified, the traversal of subobjects will be limited to that depth. If limit is negative, no checking of depth will be performed. class Klass def initialize(str) @str = str end def say_hello @str end end (produces no output) o = Klass.ne

getch

getch() Instance Public methods Scans one character and returns it. This method is multibyte character sensitive. s = StringScanner.new("ab") s.getch # => "a" s.getch # => "b" s.getch # => nil $KCODE = 'EUC' s = StringScanner.new("\244\242") s.getch # => "\244\242" # Japanese hira-kana "A" in EUC-JP s.getch # => nil