SizeUnits

Just a simple alternative to the activesupport helpers if you don't want to add activesupport as dependency to your gem/application.

It works the same way:

2.kilobytes
1.bytes
3.gigabytes

Human size

Another activesupport alternative

1500.human_size => "1KB, 476B"
1500.human_size(1) => "1KB"