register_command

register_command(command, obj=false) Instance Public methods Register the Symbol command as a gem command.

set_filter

set_filter(val) Instance Protected methods private setter for filter val

eid

Process.euid â fixnumProcess::UID.eid â fixnumProcess::Sys.geteuid â fixnum Class Public methods Returns the effective user ID for this process. Process.euid #=> 501

pos=

ios.pos = integer â integer Instance Public methods Seeks to the given position (in bytes) in ios. It is not guranteed that seeking to the right position when ios is textmode. f = File.new("testfile") f.pos = 17 f.gets #=> "This is line two\n"

eof?

ios.eof? â true or false Instance Public methods Returns true if ios is at end of file that means there are no more data to read. The stream must be opened for reading or an IOError will be raised. f = File.new("testfile") dummy = f.readlines f.eof #=> true If ios is a stream such as pipe or socket, IO#eof? blocks until the other end sends some data or closes it. r, w = IO.pipe Thread.new { sleep 1; w.close } r.eof? #=> true after 1 second blocking r, w = IO.pipe Thre

assoc

hash.assoc(obj) â an_array or nil Instance Public methods Searches through the hash comparing obj with the key using ==. Returns the key-value pair (two elements array) or nil if no match is found. See Array#assoc. h = {"colors" => ["red", "blue", "green"], "letters" => ["a", "b", "c" ]} h.assoc("letters") #=> ["letters", ["a", "b", "c"]] h.assoc("foo") #=> nil

pretty_print_cycle

pretty_print_cycle(q) Instance Public methods

can_parse

can_parse(file_name) Class Public methods Return a parser that can handle a particular extension

delete

delete(index, last=None) Instance Public methods

fake_connection

fake_connection(config) Instance Public methods