This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.
# IO.pread (from ruby core) --- ios.pread(maxlen, offset[, outbuf]) -> string --- Reads *maxlen* bytes from *ios* using the pread system call and returns them as a string without modifying the underlying descriptor offset. This is advantageous compared to combining IO#seek and IO#read in that it is atomic, allowing multiple threads/process to share the same IO object for reading the file at various locations. This bypasses any userspace buffering of the IO layer. If the optional *outbuf* argument is present, it must reference a String, which will receive the data. Raises SystemCallError on error, EOFError at end of file and NotImplementedError if platform does not implement the system call. File.write("testfile", "This is line one\nThis is line two\n") File.open("testfile") do |f| p f.read # => "This is line one\nThis is line two\n" p f.pread(12, 0) # => "This is line" p f.pread(9, 8) # => "line one\n" end
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.