README.md in wildcard_matchers-0.4.0 vs README.md in wildcard_matchers-0.9.0
- old
+ new
@@ -60,9 +60,16 @@
* for_any
* for_any(is_a_string) === [ 1, "1" ] #=> true
* responding
* responding(next: 2) === 1 #=> true (because 1.next #=> 2)
+### composite matchers
+
+* using &
+ * for_all(is_a_string) & for_any(/hoge/) # every element is String and one matched /hoge/
+* using |
+ * for_all(is_a_string) | for_all(is_a_integer) # every element is String or Integer
+
## How it works
It is very simple. Recursive match using ===, and Class, Range, and Proc act as wildcard matchers.
You can create original matcher using lambda.