This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# Socket::AncillaryData.unix_rights (from ruby core) ### Implementation from AncillaryData --- Socket::AncillaryData.unix_rights(io1, io2, ...) => ancillarydata --- Creates a new Socket::AncillaryData object which contains file descriptors as data. p Socket::AncillaryData.unix_rights(STDERR) #=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 2> (from ruby core) ### Implementation from AncillaryData --- ancillarydata.unix_rights => array-of-IOs or nil --- returns the array of IO objects for SCM_RIGHTS control message in UNIX domain socket. The class of the IO objects in the array is IO or Socket. The array is attached to *ancillarydata* when it is instantiated. For example, BasicSocket#recvmsg attach the array when receives a SCM_RIGHTS control message and :scm_rights=>true option is given. # recvmsg needs :scm_rights=>true for unix_rights s1, s2 = UNIXSocket.pair p s1 #=> #<UNIXSocket:fd 3> s1.sendmsg "stdin and a socket", 0, nil, Socket::AncillaryData.unix_rights(STDIN, s1) _, _, _, ctl = s2.recvmsg(:scm_rights=>true) p ctl #=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 6 7> p ctl.unix_rights #=> [#<IO:fd 6>, #<Socket:fd 7>] p File.identical?(STDIN, ctl.unix_rights[0]) #=> true p File.identical?(s1, ctl.unix_rights[1]) #=> true # If :scm_rights=>true is not given, unix_rights returns nil s1, s2 = UNIXSocket.pair s1.sendmsg "stdin and a socket", 0, nil, Socket::AncillaryData.unix_rights(STDIN, s1) _, _, _, ctl = s2.recvmsg p ctl #=> #<Socket::AncillaryData: UNIX SOCKET RIGHTS 6 7> p ctl.unix_rights #=> nil
This is MURDOC! A Ruby documentation browser inspired by Smalltalk-80. It allows you to learn about Ruby by browsing through its class hierarchies, and see any of its methods.