You can use the sys/filesystem gem to get system disk space information in Ruby.
Here is an example code snippet that outputs the total capacity of the root directory:
main.rb191 chars7 linesThis code snippet requires the sys/filesystem gem. You can install it by running gem install sys-filesystem in your terminal.
gistlibby LogSnag