website/index.html in patternmatching-0.1.4 vs website/index.html in patternmatching-0.2.0

- old
+ new

@@ -31,11 +31,11 @@ <div id="main"> <h1>PatternMatching module</h1> <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/patternmatching"; return false'> Get Version - <a href="http://rubyforge.org/projects/patternmatching" class="numbers">0.1.4</a> + <a href="http://rubyforge.org/projects/patternmatching" class="numbers">0.2.0</a> </div> <h1>&#x2192; &#8216;patternmatching&#8217;</h1> <h2>What</h2> @@ -69,13 +69,11 @@ <p>Note: Default equivalence used in structured pattern matching is based on &#8220;<code>pattern === data</code>&#8221;, so &#8220;<code>foo(Numeric)</code>&#8221; matches &#8220;<code>foo(100)</code>&#8221;.</p> - <p>Notice: Current implementation is not thread safe now. -Need the receiver object(NOT an argument) calling pattern matching -synchronized when multi-threaded access.</p> + <p>From ver. 0.2.0, thread unsafeness restriction is removed.</p> <h2>Demonstration of usage</h2> @@ -197,10 +195,50 @@ puts "no name" end end # =&gt; "He is Jiro" </pre> +<h3>Field Access Example</h3> +It is ver 0.2.0 <span class="caps">API</span> +<pre> +require "patternmatching" + +include PatternMatching + +class Foo + def initialize + @name = "Foo" + end + attr :name + def foo + end + + def bar + make "bar" do + seems as {:val} do + foo + # To access fields like this.name or this.name = ... + the.name = val + # To access self as this + this + end + end + end + + func(:buzz).seems as {:val} do + the.name = val + this + end +end + +o = Foo.new +p o.bar == o #=&gt; true +p o.name #=&gt; "bar" +p o.buzz("buzz") == o #=&gt; true +p o.name #=&gt; "buzz" +</pre> + <h2>Forum</h2> <p>Visit RubyForge project forum.</p> @@ -218,10 +256,10 @@ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p> - <h2>Link</h2> + <h2>Links</h2> <ul> <li><a href="http://patternmatching.rubyforge.org/">Web Site</a></li> <li><a href="http://rubyforge.org/projects/patternmatching/">Project Page</a></li>