getpwuid

getpwuid(uid) â Passwd Class Public methods Returns the /etc/passwd information for the user with the given integer uid. The information is returned as a Passwd struct. If uid is omitted, the value from Passwd[:uid] is returned instead. See the unix manpage for getpwuid(3) for more detail. Example: Etc.getpwuid(0) #=> #<struct Struct::Passwd name="root", passwd="x", uid=0, gid=0, gecos="root",dir="/root", shell="/bin/bash">

group

group() Class Public methods Provides a convenient Ruby iterator which executes a block for each entry in the /etc/group file. The code block is passed an Group struct. See ::getgrent above for details. Example: require 'etc' Etc.group {|g| puts g.name + ": " + g.mem.join(', ') }

passwd

Etc.passwd { |struct| block } â PasswdEtc.passwd â Passwd Class Public methods Provides a convenient Ruby iterator which executes a block for each entry in the /etc/passwd file. The code block is passed an Passwd struct. See ::getpwent above for details. Example: require 'etc' Etc.passwd {|u| puts u.name + " = " + u.gecos }

setgrent

setgrent() Class Public methods Resets the process of reading the /etc/group file, so that the next call to ::getgrent will return the first entry again.

setpwent

setpwent() Class Public methods Resets the process of reading the /etc/passwd file, so that the next call to ::getpwent will return the first entry again.

sysconfdir

sysconfdir() Class Public methods Returns system configuration directory. This is typically â/etcâ, but is modified by the prefix used when Ruby was compiled. For example, if Ruby is built and installed in /usr/local, returns â/usr/local/etcâ.

systmpdir

systmpdir() Class Public methods Returns system temporary directory; typically â/tmpâ.

exception

exc.exception(string) â an_exception or exc Class Public methods With no argument, or if the argument is the same as the receiver, return the receiver. Otherwise, create a new exception object of the same class as the receiver, but with a message equal to string.to_str.

json_create

json_create(object) Class Public methods Deserializes JSON string by constructing new Exception object with message m and backtrace b serialized with to_json

new

Exception.new(msg = nil) â exception Class Public methods Construct a new Exception object, optionally passing in a message.