Class: Fixnum

Inherits:
Object
  • Object
show all
Defined in:
lib/rush/fixnum_ext.rb

Overview

Integer extensions for file and dir sizes (returned in bytes).

Example:

box.files_flattened.select { |f| f.size > 10.mb }

Instance Method Summary collapse

Instance Method Details

#gbObject



15
16
17
# File 'lib/rush/fixnum_ext.rb', line 15

def gb
  mb * 1024
end

#kbObject



7
8
9
# File 'lib/rush/fixnum_ext.rb', line 7

def kb
  self * 1024
end

#mbObject



11
12
13
# File 'lib/rush/fixnum_ext.rb', line 11

def mb
  kb * 1024
end