Enables the use of byte calculations and declarations, like 45.bytes + 2.6.megabytes
Methods
- B
- E
- G
- K
- M
- P
- T
Instance Public methods
Also aliased as: byte
Source: show
# File rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 6 def bytes self end
Also aliased as: exabyte
Source: show
# File rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 36 def exabytes self * 1024.petabytes end
Also aliased as: gigabyte
Source: show
# File rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 21 def gigabytes self * 1024.megabytes end
Also aliased as: kilobyte
Source: show
# File rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 11 def kilobytes self * 1024 end
Also aliased as: megabyte
Source: show
# File rails/activesupport/lib/active_support/core_ext/numeric/bytes.rb, line 16 def megabytes self * 1024.kilobytes end