insert

insert(idx, tag=nil, keys={}) Instance Public methods

wait2

Process.wait2(pid=-1, flags=0) â [pid, status] Class Public methods Waits for a child process to exit (see ::waitpid for exact semantics) and returns an array containing the process id and the exit status (a Process::Status object) of that child. Raises a SystemCallError if there are no child processes. Process.fork { exit 99 } #=> 27437 pid, status = Process.wait2 pid #=> 27437 status.exitstatus #=> 99

waitall

Process.waitall â [ [pid1,status1], ...] Class Public methods Waits for all children, returning an array of pid/status pairs (where status is a Process::Status object). fork { sleep 0.2; exit 2 } #=> 27432 fork { sleep 0.1; exit 1 } #=> 27433 fork { exit 0 } #=> 27434 p Process.waitall produces: [[30982, #<Process::Status: pid 30982 exit 0>], [30979, #<Process::Status: pid 30979 exit 1>], [30976, #<Process::Status: pid 30976 exit 2>

to_s

to_s() Instance Public methods

code

code() Instance Public methods Returns a string to ensure compatibility with Net::HTTPResponse.

deflate

Zlib.deflate(string[, level])Zlib::Deflate.deflate(string[, level]) Class Public methods Compresses the given string. Valid values of level are Zlib::NO_COMPRESSION, Zlib::BEST_SPEED, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_COMPRESSION, or an integer from 0 to 9 (the default is 6). This method is almost equivalent to the following code: def deflate(string, level) z = Zlib::Deflate.new(level) dst = z.deflate(string, Zlib::FINISH) z.close dst end See also Zlib.inflate

new

new( indentation=2, ie_hack=false ) Class Public methods Create a new pretty printer. output An object implementing '<<(String)', to which the output will be written. indentation An integer greater than 0. The indentation of each level will be this number of spaces. If this is < 1, the behavior of this object is undefined. Defaults to 2. ie_hack If true, the printer will insert whitespace before closing empty tags, thereby allowing Internet Explorer's feeble XML

detach

detach(*items) Instance Public methods

main_type

main_type() Instance Public methods Returns a content type string such as âtextâ. This method returns nil if Content-Type: header field does not exist.

to_date

to_date() Instance Public methods Return a Date object of the date which represents self. The Date object do not contain the time component (only date).