Convert Byte, Kbyte, MByte, Gbyte into each other easy as to_b.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install humanize-bytes
Initialize a New Byte Object with
Then call one of the methods: to_b, to_k, to_m, to_g.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request