This is a Ruby tree! It shows every object from the Ruby Programming Language in a tree format.

truncate

        # File.truncate

(from ruby core)
---
    File.truncate(file_name, integer)  -> 0

---

Truncates the file *file_name* to be at most *integer* bytes long. Not
available on all platforms.

    f = File.new("out", "w")
    f.write("1234567890")     #=> 10
    f.close                   #=> nil
    File.truncate("out", 5)   #=> 0
    File.size("out")          #=> 5


(from ruby core)
---
    file.truncate(integer)    -> 0

---

Truncates *file* to at most *integer* bytes. The file must be opened for
writing. Not available on all platforms.

    f = File.new("out", "w")
    f.syswrite("1234567890")   #=> 10
    f.truncate(5)              #=> 0
    f.close()                  #=> nil
    File.size("out")           #=> 5



      

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.