README.md in si-0.1.1 vs README.md in si-0.1.2
- old
+ new
@@ -18,10 +18,12 @@
## Usage
### `si`
+Express a numeric value with SI prefix.
+
```ruby
0.9.si # '900m'
9.si # '9'
98.si # '98'
987.si # '987'
@@ -48,22 +50,35 @@
```ruby
9876543210000.si(:length => 5) # '9.8765T'
# For convenience, a single Fixnum is recognized as :length value
-9876543210000.si(5) # '9.8765T'
+9876543210000.si(5) # '9.8765T'
```
### `si_byte`
-`si_byte` is simply a shorcut for
+`si_byte` is simply a shorcut for `number.si(:length => length, :base => 1024, :min_exp => 0) + 'B'`.
```ruby
-number.si(:length => length, :base => 1024, :min_exp => 0) + 'B'
+13255342817.si_byte(3) # '12.3GB'
```
+## SI module methods: convert / revert
+
```ruby
-13255342817.si_byte(3) # '12.3GB'
+SI.convert(9876543210000, :length => 5) # '9.8765T'
+SI.revert('100k', :base => 1024) # 102400.0
+```
+
+## Avoiding monkey-patching
+
+Require 'si/minimal' instead to avoid monkey-patching numeric classes.
+
+```ruby
+require 'si/minimal'
+
+SI.convert(987654321, 3) # 988M
```
## Contributing
1. Fork it