website/index.txt in patternmatching-0.2.1 vs website/index.txt in patternmatching-0.2.2
- old
+ new
@@ -185,9 +185,28 @@
p o.name #=> "bar"
p o.buzz("buzz") == o #=> true
p o.name #=> "buzz"
</pre>
+<h3>Pattern with Condition Example</h3>
+It is from ver 0.2.2 API
+<pre>
+require "patternmatching"
+
+include PatternMatching
+
+num = 100
+result = make num do
+ seems as {:n}, with {n < 10} do
+ true
+ end
+ seems as {:n}, with {n >= 10} do
+ false
+ end
+end
+
+p result #=> false
+</pre>
h2. Forum
Visit RubyForge project forum.