Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Convert Byte, Kbyte, MByte, Gbyte into each other
Ruby
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
spec Converted #value to float on initialization
.gitignore
.rspec Updating some ancient code =)
.ruby-gemset
.ruby-version Improved API by removing Bytes namespace
.travis.yml Improved API by removing Bytes namespace
Gemfile Models added
LICENSE.md
README.md
Rakefile
humanize-bytes.gemspec Fix #to_s

README.md

Humanize::Bytes Build Status

Convert Byte, Kbyte, MByte, Gbyte into each other easy as to_b.

Installation

Add this line to your application's Gemfile:

gem 'humanize-bytes'

And then execute:

$ bundle

Or install it yourself as:

$ gem install humanize-bytes

Usage

Initialize a New Byte Object with

Humanize::Byte.new(1024)

Then call one of the methods: to_b, to_k, to_m, to_g.

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.