README.md in percentable-0.1.0 vs README.md in percentable-1.0.0
- old
+ new
@@ -66,18 +66,26 @@
10 / percent #=> 20
```
Repeat steps above for Floats, BigDecimals, etc. It should all work.
-### Can I turn other Numerics into Percents?
+### Can I turn Numerics into Percents?
Yes, yes you can.
``` ruby
10.to_percent #=> Percent.new(10)
```
+### What if I want to turn my Numeric into what it would actually be as a percent?
+
+Sometimes 10.to_percent is not what you want. That returns you `Percent.new(10)` which is equal only to 0.1. If you have 0.1 and want to turn that into a percent representation, use the code below:
+
+``` ruby
+Percent.from_numeric(1) #=> Percent.new(100)
+```
+
### How do I use this with Rails?
Well let's say you have a User model, and on that user model you have a health attribute. You want to set that to a number that represents the percent. Just use the extend Percentable::Percentize method, and then use the percentize method to make sure you are returned percent objects always. Example below:
``` ruby
@@ -110,20 +118,22 @@
percentize_object = PercentizedClass.new
percentize_object.returns_a_percent #=> Percent.new(10)
```
-You can do percentize multiple methods at a time:
+### What else can percentize do?
+You can percentize multiple methods at a time:
+
``` ruby
class PercentizedClass < OriginalClass
extend Percentable::Percentize
percentize :method1, :method2
end
```
-You can define defaults for when the percentized method returns nil:
+You can also define defaults for when the percentized method returns nil:
``` ruby
class PercentizedClass < OriginalClass
extend Percentable::Percentize