Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
Methods
Public Instance methods
Alias for bytes
This method is also aliased as
byte
[ show source ]
# File vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 6 6: def bytes 7: self 8: end
Alias for gigabytes
This method is also aliased as
gigabyte
[ show source ]
# File vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 21
21: def gigabytes
22: self * 1024.megabytes
23: end
Alias for kilobytes
This method is also aliased as
kilobyte
[ show source ]
# File vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 11
11: def kilobytes
12: self * 1024
13: end
Alias for megabytes
This method is also aliased as
megabyte
[ show source ]
# File vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 16
16: def megabytes
17: self * 1024.kilobytes
18: end
Alias for terabytes
This method is also aliased as
terabyte
[ show source ]
# File vendor/rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 26
26: def terabytes
27: self * 1024.gigabytes
28: end