class Total::Mem
Memory specifics.
Public Instance Methods
bytes()
click to toggle source
Get it in bytes.
# File lib/total.rb, line 47 def bytes target.memory end
Private Instance Methods
target()
click to toggle source
Target object to calculate memory size.
# File lib/total.rb, line 54 def target return Total::OSX.new if RUBY_PLATFORM.include?('darwin') return Total::Linux.new if RUBY_PLATFORM.include?('linux') return Total::FreeBSD.new if RUBY_PLATFORM.include?('freebsd') raise CantDetect, "Can\'t detect operating system: #{RUBY_PLATFORM}" end