README.md in footing-0.0.1 vs README.md in footing-0.0.2
- old
+ new
@@ -1,54 +1,68 @@
# Footing
#### NOTE: this lib is experimental at the moment
-This lib extends native objects with additional functionality.
+Footing provides some sanity for monkey patching practices.
+It's also a utility lib that contains additional functionality for core objects that you might find useful.
## No implicit monkey patching
-**No surprises here.** You must explicitly ask for Footing goodness to be added to your objects.
+**No surprises here.** You must explicitly patch.
```ruby
# some examples of explicit patching
-Footing.patch!(String)
+Footing.patch! String, Footing::String
+Footing.patch! Numeric, Footing::Numeric
+```
+
+```ruby
+# instrospect the changes
String.ancestors
[
String,
Footing::String::InstanceMethods,
+ Footing::String,
Comparable,
Object,
- PP::ObjectMixin,
Kernel,
BasicObject
]
-Footing.patch!(Numeric)
+Numeric.ancestors
[
Numeric,
Footing::Numeric::InstanceMethods,
+ Footing::Numeric,
Comparable,
Object,
- PP::ObjectMixin,
Kernel,
BasicObject
]
```
## Instance patching
-If you don't want to corrupt your entire runtime, you can patch an instance.
+If you don't want to corrupt the entire runtime, you can patch an instance.
```ruby
s = "foo"
-Footing.patch!(s)
+Footing.patch! s, Footing::String
s.respond_to? :escape # => true
"foo".respond_to? :escape # => false
```
+## Shotgun patching
+
+For the lazy and brave, you can also patch everything at once.
+
+```ruby
+Footing.patch_all!
+```
+
## Kick the tires
* `git clone git://github.com/hopsoft/footing.git`
* `cd /path/to/footing`
* `bundle`
* `./console`
-* `Footing.patch(String)`
+* `Footing.patch String, Footing::String`