1
0
Fork 0
mirror of https://github.com/aasm/aasm synced 2023-03-27 23:22:41 -04:00

rebuild docs

This commit is contained in:
Travis Tilley 2010-01-17 01:34:58 -05:00
parent 6a330990b5
commit e7c1ec6842
30 changed files with 714 additions and 636 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
.idea

View file

@ -23,17 +23,9 @@
<li><a href="../files/lib/aasm/aasm_rb.html">lib/aasm/aasm.rb</a></li>
<li><a href="../files/lib/aasm/event_rb.html">lib/aasm/event.rb</a></li>
<li><a href="../files/lib/aasm/persistence/active_record_persistence_rb.html">lib/aasm/persistence/active_record_persistence.rb</a></li>
<li><a href="../files/lib/aasm/persistence_rb.html">lib/aasm/persistence.rb</a></li>
<li><a href="../files/lib/aasm/state_rb.html">lib/aasm/state.rb</a></li>
<li><a href="../files/lib/aasm/state_machine_rb.html">lib/aasm/state_machine.rb</a></li>
<li><a href="../files/lib/aasm/state_transition_rb.html">lib/aasm/state_transition.rb</a></li>
<li><a href="../files/lib/aasm_rb.html">lib/aasm.rb</a></li>
</ul>
</div>
@ -55,13 +47,13 @@
<dd>
<ul>
<li><a href="#M000011">aasm_current_state</a>,</li>
<li><a href="#M000009">aasm_current_state</a>,</li>
<li><a href="#M000012">aasm_enter_initial_state</a>,</li>
<li><a href="#M000010">aasm_enter_initial_state</a>,</li>
<li><a href="#M000015">aasm_events_for_current_state</a>,</li>
<li><a href="#M000011">aasm_events_for_current_state</a>,</li>
<li><a href="#M000016">aasm_events_for_state</a></li>
<li><a href="#M000012">aasm_events_for_state</a></li>
</ul>
</dd>
@ -100,9 +92,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000011">
<div class="title" id="M000009">
<a name="M000011"></a><b>aasm_current_state</b>()
<a name="M000009"></a><b>aasm_current_state</b>()
</div>
@ -118,13 +110,13 @@ Instance methods
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
Source: <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L80" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L75" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000011_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 80</span>
<div id="M000009_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 75</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_current_state</span>
<span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@aasm_current_state</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@aasm_current_state</span>
@ -141,9 +133,9 @@ Instance methods
</div>
<div class="method">
<div class="title" id="M000012">
<div class="title" id="M000010">
<a name="M000012"></a><b>aasm_enter_initial_state</b>()
<a name="M000010"></a><b>aasm_enter_initial_state</b>()
</div>
@ -152,13 +144,13 @@ Instance methods
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
Source: <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L91" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L86" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000012_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 91</span>
<div id="M000010_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 86</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_enter_initial_state</span>
<span class="ruby-identifier">state_name</span> = <span class="ruby-identifier">aasm_determine_state_name</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">aasm_initial_state</span>)
<span class="ruby-identifier">state</span> = <span class="ruby-identifier">aasm_state_object_for_state</span>(<span class="ruby-identifier">state_name</span>)
@ -176,9 +168,9 @@ Instance methods
</div>
<div class="method">
<div class="title" id="M000015">
<div class="title" id="M000011">
<a name="M000015"></a><b>aasm_events_for_current_state</b>()
<a name="M000011"></a><b>aasm_events_for_current_state</b>()
</div>
@ -187,13 +179,13 @@ Instance methods
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show</a>
Source: <a href="javascript:toggleSource('M000011_source')" id="l_M000011_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L103" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L98" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000015_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 103</span>
<div id="M000011_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 98</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_events_for_current_state</span>
<span class="ruby-identifier">aasm_events_for_state</span>(<span class="ruby-identifier">aasm_current_state</span>)
<span class="ruby-keyword kw">end</span></pre>
@ -203,9 +195,9 @@ Instance methods
</div>
<div class="method">
<div class="title" id="M000016">
<div class="title" id="M000012">
<a name="M000016"></a><b>aasm_events_for_state</b>(state)
<a name="M000012"></a><b>aasm_events_for_state</b>(state)
</div>
@ -214,13 +206,13 @@ Instance methods
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000016_source')" id="l_M000016_source">show</a>
Source: <a href="javascript:toggleSource('M000012_source')" id="l_M000012_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L107" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L102" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000016_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 107</span>
<div id="M000012_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 102</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_events_for_state</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-identifier">events</span> = <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">aasm_events</span>.<span class="ruby-identifier">values</span>.<span class="ruby-identifier">select</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">event</span><span class="ruby-operator">|</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">transitions_from_state?</span>(<span class="ruby-identifier">state</span>) }
<span class="ruby-identifier">events</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">event</span><span class="ruby-operator">|</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">name</span>}

View file

@ -99,11 +99,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000005_source')" id="l_M000005_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L49" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L44" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000005_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 49</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 44</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_event</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-identifier">sm</span> = <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>]
@ -138,11 +138,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000007_source')" id="l_M000007_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L69" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L64" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000007_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 69</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 64</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_events</span>
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">events</span>
<span class="ruby-keyword kw">end</span></pre>
@ -165,11 +165,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000002_source')" id="l_M000002_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L27" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L22" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000002_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 27</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 22</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_initial_state</span>(<span class="ruby-identifier">set_state</span>=<span class="ruby-keyword kw">nil</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">set_state</span>
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">initial_state</span> = <span class="ruby-identifier">set_state</span>
@ -196,11 +196,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000003_source')" id="l_M000003_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L35" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L30" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000003_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 35</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 30</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_initial_state=</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">initial_state</span> = <span class="ruby-identifier">state</span>
<span class="ruby-keyword kw">end</span></pre>
@ -223,11 +223,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000004_source')" id="l_M000004_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L39" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L34" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000004_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 39</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_state</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>={})
<span class="ruby-identifier">sm</span> = <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>]
<span class="ruby-identifier">sm</span>.<span class="ruby-identifier">create_state</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
@ -256,11 +256,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000006_source')" id="l_M000006_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L65" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L60" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000006_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 65</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 60</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_states</span>
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">states</span>
<span class="ruby-keyword kw">end</span></pre>
@ -283,11 +283,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000008_source')" id="l_M000008_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L73" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L68" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000008_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 73</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 68</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_states_for_select</span>
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">states</span>.<span class="ruby-identifier">map</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">state</span><span class="ruby-operator">|</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">for_select</span> }
<span class="ruby-keyword kw">end</span></pre>
@ -310,11 +310,11 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000001_source')" id="l_M000001_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L22" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/aasm.rb#L17" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000001_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 22</span>
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 17</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inherited</span>(<span class="ruby-identifier">klass</span>)
<span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-identifier">klass</span>] = <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">StateMachine</span>[<span class="ruby-keyword kw">self</span>].<span class="ruby-identifier">clone</span>
<span class="ruby-keyword kw">super</span>

View file

@ -21,10 +21,10 @@
</h1>
<ul class="files">
<li><a href="../../files/lib/aasm/persistence/active_record_persistence_rb.html">lib/aasm/persistence/active_record_persistence.rb</a></li>
<li><a href="../../files/lib/aasm/persistence_rb.html">lib/aasm/persistence.rb</a></li>
<li><a href="../../files/lib/aasm/persistence/active_record_persistence_rb.html">lib/aasm/persistence/active_record_persistence.rb</a></li>
</ul>
</div>
<div id="bodyContent">
@ -96,20 +96,20 @@ href="Persistence/ActiveRecordPersistence.html">ActiveRecordPersistence</a>
<p class="source-link">
Source: <a href="javascript:toggleSource('M000030_source')" id="l_M000030_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/1e4c038eeec9c6a2a751196a9e36f165e144b721/lib/aasm/persistence.rb#L6" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/persistence.rb#L5" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000030_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_persistence</span>(<span class="ruby-identifier">base</span>)
<span class="ruby-comment cmt"># Use a fancier auto-loading thingy, perhaps. When there are more persistence engines.</span>
<span class="ruby-identifier">hierarchy</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>}
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence.rb, line 5</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">set_persistence</span>(<span class="ruby-identifier">base</span>)
<span class="ruby-comment cmt"># Use a fancier auto-loading thingy, perhaps. When there are more persistence engines.</span>
<span class="ruby-identifier">hierarchy</span> = <span class="ruby-identifier">base</span>.<span class="ruby-identifier">ancestors</span>.<span class="ruby-identifier">map</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">klass</span><span class="ruby-operator">|</span> <span class="ruby-identifier">klass</span>.<span class="ruby-identifier">to_s</span>}
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hierarchy</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;ActiveRecord::Base&quot;</span>)
<span class="ruby-identifier">require</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">'persistence'</span>, <span class="ruby-value str">'active_record_persistence'</span>)
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:include</span>, <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">Persistence</span><span class="ruby-operator">::</span><span class="ruby-constant">ActiveRecordPersistence</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">hierarchy</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">&quot;ActiveRecord::Base&quot;</span>)
<span class="ruby-identifier">require</span> <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">dirname</span>(<span class="ruby-keyword kw">__FILE__</span>), <span class="ruby-value str">'persistence'</span>, <span class="ruby-value str">'active_record_persistence'</span>)
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:include</span>, <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">Persistence</span><span class="ruby-operator">::</span><span class="ruby-constant">ActiveRecordPersistence</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000029">included</a></li>
<li><a href="#M000031">included</a></li>
</ul>
</dd>
@ -82,9 +82,9 @@
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000029">
<div class="title" id="M000031">
<a name="M000029"></a><b>included</b>(base)
<a name="M000031"></a><b>included</b>(base)
</div>
@ -150,12 +150,12 @@ following 2 are equivalent
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000029_source')" id="l_M000029_source">show</a>
Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L34" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000029_source" class="dyn-source">
<div id="M000031_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">included</span>(<span class="ruby-identifier">base</span>)
<span class="ruby-identifier">base</span>.<span class="ruby-identifier">extend</span> <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">Persistence</span><span class="ruby-operator">::</span><span class="ruby-constant">ActiveRecordPersistence</span><span class="ruby-operator">::</span><span class="ruby-constant">ClassMethods</span>

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000031">aasm_column</a></li>
<li><a href="#M000032">aasm_column</a></li>
</ul>
</dd>
@ -52,9 +52,9 @@
<dd>
<ul>
<li><a href="#M000034">calculate_in_state</a>,</li>
<li><a href="#M000035">calculate_in_state</a>,</li>
<li><a href="#M000033">count_in_state</a></li>
<li><a href="#M000034">count_in_state</a></li>
</ul>
</dd>
@ -63,7 +63,7 @@
<dd>
<ul>
<li><a href="#M000032">find_in_state</a></li>
<li><a href="#M000033">find_in_state</a></li>
</ul>
</dd>
@ -72,7 +72,7 @@
<dd>
<ul>
<li><a href="#M000035">with_state_scope</a></li>
<li><a href="#M000036">with_state_scope</a></li>
</ul>
</dd>
@ -94,15 +94,15 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000031">
<div class="title" id="M000032">
<a name="M000031"></a><b>aasm_column</b>(column_name=nil)
<a name="M000032"></a><b>aasm_column</b>(column_name=nil)
</div>
<div class="description">
<p>
Maps to the <a href="ClassMethods.html#M000031">aasm_column</a> in the
Maps to the <a href="ClassMethods.html#M000032">aasm_column</a> in the
database. Deafults to &#8220;aasm_state&#8220;. You can write:
</p>
<pre>
@ -140,12 +140,12 @@ This method is both a getter and a setter
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000031_source')" id="l_M000031_source">show</a>
Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L82" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000031_source" class="dyn-source">
<div id="M000032_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 82</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_column</span>(<span class="ruby-identifier">column_name</span>=<span class="ruby-keyword kw">nil</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">column_name</span>
@ -164,9 +164,9 @@ This method is both a getter and a setter
</div>
<div class="method">
<div class="title" id="M000034">
<div class="title" id="M000035">
<a name="M000034"></a><b>calculate_in_state</b>(state, *args)
<a name="M000035"></a><b>calculate_in_state</b>(state, *args)
</div>
@ -175,12 +175,12 @@ This method is both a getter and a setter
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L106" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000034_source" class="dyn-source">
<div id="M000035_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 106</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">calculate_in_state</span>(<span class="ruby-identifier">state</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">with_state_scope</span> <span class="ruby-identifier">state</span> <span class="ruby-keyword kw">do</span>
@ -193,9 +193,9 @@ This method is both a getter and a setter
</div>
<div class="method">
<div class="title" id="M000033">
<div class="title" id="M000034">
<a name="M000033"></a><b>count_in_state</b>(state, *args)
<a name="M000034"></a><b>count_in_state</b>(state, *args)
</div>
@ -204,12 +204,12 @@ This method is both a getter and a setter
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
Source: <a href="javascript:toggleSource('M000034_source')" id="l_M000034_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L100" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000033_source" class="dyn-source">
<div id="M000034_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 100</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">count_in_state</span>(<span class="ruby-identifier">state</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">with_state_scope</span> <span class="ruby-identifier">state</span> <span class="ruby-keyword kw">do</span>
@ -222,9 +222,9 @@ This method is both a getter and a setter
</div>
<div class="method">
<div class="title" id="M000032">
<div class="title" id="M000033">
<a name="M000032"></a><b>find_in_state</b>(number, state, *args)
<a name="M000033"></a><b>find_in_state</b>(number, state, *args)
</div>
@ -233,12 +233,12 @@ This method is both a getter and a setter
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000032_source')" id="l_M000032_source">show</a>
Source: <a href="javascript:toggleSource('M000033_source')" id="l_M000033_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L94" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000032_source" class="dyn-source">
<div id="M000033_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 94</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">find_in_state</span>(<span class="ruby-identifier">number</span>, <span class="ruby-identifier">state</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">with_state_scope</span> <span class="ruby-identifier">state</span> <span class="ruby-keyword kw">do</span>
@ -253,9 +253,9 @@ This method is both a getter and a setter
<div class="sectiontitle">Instance Protected methods</div>
<div class="method">
<div class="title" id="M000035">
<div class="title" id="M000036">
<a name="M000035"></a><b>with_state_scope</b>(state)
<a name="M000036"></a><b>with_state_scope</b>(state)
</div>
@ -264,12 +264,12 @@ This method is both a getter and a setter
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000035_source')" id="l_M000035_source">show</a>
Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L113" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000035_source" class="dyn-source">
<div id="M000036_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 113</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">with_state_scope</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-identifier">with_scope</span> <span class="ruby-identifier">:find</span> =<span class="ruby-operator">&gt;</span> {<span class="ruby-identifier">:conditions</span> =<span class="ruby-operator">&gt;</span> [<span class="ruby-node">&quot;#{table_name}.#{aasm_column} = ?&quot;</span>, <span class="ruby-identifier">state</span>.<span class="ruby-identifier">to_s</span>]} <span class="ruby-keyword kw">do</span>

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000048">aasm_state_with_named_scope</a></li>
<li><a href="#M000049">aasm_state_with_named_scope</a></li>
</ul>
</dd>
@ -65,9 +65,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000048">
<div class="title" id="M000049">
<a name="M000048"></a><b>aasm_state_with_named_scope</b>(name, options = {})
<a name="M000049"></a><b>aasm_state_with_named_scope</b>(name, options = {})
</div>
@ -76,12 +76,12 @@
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000048_source')" id="l_M000048_source">show</a>
Source: <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L241" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000048_source" class="dyn-source">
<div id="M000049_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 241</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_state_with_named_scope</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}
<span class="ruby-identifier">aasm_state_without_named_scope</span> <span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000047">aasm_read_state</a></li>
<li><a href="#M000044">aasm_read_state</a></li>
</ul>
</dd>
@ -65,9 +65,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000047">
<div class="title" id="M000044">
<a name="M000047"></a><b>aasm_read_state</b>()
<a name="M000044"></a><b>aasm_read_state</b>()
</div>
@ -112,12 +112,12 @@ This allows for nil aasm states - be sure to add validation to your model
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show</a>
Source: <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L231" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000047_source" class="dyn-source">
<div id="M000044_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 231</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_read_state</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">new_record?</span>

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000044">aasm_write_state</a></li>
<li><a href="#M000040">aasm_write_state</a></li>
</ul>
</dd>
@ -65,9 +65,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000044">
<div class="title" id="M000040">
<a name="M000044"></a><b>aasm_write_state</b>(state)
<a name="M000040"></a><b>aasm_write_state</b>(state)
</div>
@ -94,12 +94,12 @@ NOTE: intended to be called from an event
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000044_source')" id="l_M000044_source">show</a>
Source: <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L192" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000044_source" class="dyn-source">
<div id="M000040_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 192</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_write_state</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-identifier">old_value</span> = <span class="ruby-identifier">read_attribute</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">aasm_column</span>)

View file

@ -43,7 +43,7 @@
<dd>
<ul>
<li><a href="#M000043">aasm_write_state_without_persistence</a></li>
<li><a href="#M000039">aasm_write_state_without_persistence</a></li>
</ul>
</dd>
@ -65,9 +65,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000043">
<div class="title" id="M000039">
<a name="M000043"></a><b>aasm_write_state_without_persistence</b>(state)
<a name="M000039"></a><b>aasm_write_state_without_persistence</b>(state)
</div>
@ -97,12 +97,12 @@ NOTE: intended to be called from an event
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show</a>
Source: <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/e97a93089705ca55c8ac9c59afb8b75695f0c5cc/lib/aasm/persistence/active_record_persistence.rb#L176" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000043_source" class="dyn-source">
<div id="M000039_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/persistence/active_record_persistence.rb, line 176</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">aasm_write_state_without_persistence</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-identifier">write_attribute</span>(<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">class</span>.<span class="ruby-identifier">aasm_column</span>, <span class="ruby-identifier">state</span>.<span class="ruby-identifier">to_s</span>)

View file

@ -49,9 +49,9 @@
<dd>
<ul>
<li><a href="#M000049">[]</a>,</li>
<li><a href="#M000050">[]</a>,</li>
<li><a href="#M000050">[]=</a></li>
<li><a href="#M000051">[]=</a></li>
</ul>
</dd>
@ -60,9 +60,9 @@
<dd>
<ul>
<li><a href="#M000052">clone</a>,</li>
<li><a href="#M000053">clone</a>,</li>
<li><a href="#M000053">create_state</a></li>
<li><a href="#M000057">create_state</a></li>
</ul>
</dd>
@ -71,7 +71,7 @@
<dd>
<ul>
<li><a href="#M000051">new</a></li>
<li><a href="#M000052">new</a></li>
</ul>
</dd>
@ -137,37 +137,10 @@
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000049">
<a name="M000049"></a><b>[]</b>(*args)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000049_source')" id="l_M000049_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_machine.rb#L5" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000049_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 5</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
(<span class="ruby-ivar">@machines</span> <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">args</span>]
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000050">
<a name="M000050"></a><b>[]=</b>(*args)
<a name="M000050"></a><b>[]</b>(*args)
</div>
@ -178,15 +151,14 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000050_source')" id="l_M000050_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_machine.rb#L9" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_machine.rb#L2" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000050_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 9</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]=</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>
(<span class="ruby-ivar">@machines</span> <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">args</span>] = <span class="ruby-identifier">val</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 2</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
(<span class="ruby-ivar">@machines</span> <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">args</span>]
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -195,7 +167,7 @@
<div class="method">
<div class="title" id="M000051">
<a name="M000051"></a><b>new</b>(name)
<a name="M000051"></a><b>[]=</b>(*args)
</div>
@ -206,29 +178,24 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000051_source')" id="l_M000051_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_machine.rb#L17" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_machine.rb#L6" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000051_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 17</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-ivar">@initial_state</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-ivar">@states</span> = []
<span class="ruby-ivar">@events</span> = {}
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-operator">[]=</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">val</span> = <span class="ruby-identifier">args</span>.<span class="ruby-identifier">pop</span>
(<span class="ruby-ivar">@machines</span> <span class="ruby-operator">||=</span> {})[<span class="ruby-identifier">args</span>] = <span class="ruby-identifier">val</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000052">
<a name="M000052"></a><b>clone</b>()
<a name="M000052"></a><b>new</b>(name)
</div>
@ -239,26 +206,29 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000052_source')" id="l_M000052_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_machine.rb#L25" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_machine.rb#L14" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000052_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 25</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span> = <span class="ruby-keyword kw">super</span>
<span class="ruby-identifier">klone</span>.<span class="ruby-identifier">states</span> = <span class="ruby-identifier">states</span>.<span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span>.<span class="ruby-identifier">events</span> = <span class="ruby-identifier">events</span>.<span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 14</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-ivar">@initial_state</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-ivar">@states</span> = []
<span class="ruby-ivar">@events</span> = {}
<span class="ruby-ivar">@config</span> = <span class="ruby-constant">OpenStruct</span>.<span class="ruby-identifier">new</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000053">
<a name="M000053"></a><b>create_state</b>(name, options)
<a name="M000053"></a><b>clone</b>()
</div>
@ -269,14 +239,44 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000053_source')" id="l_M000053_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_machine.rb#L32" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_machine.rb#L22" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000053_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 32</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_state</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-ivar">@states</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">SupportingClasses</span><span class="ruby-operator">::</span><span class="ruby-constant">State</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@states</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 22</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span> = <span class="ruby-keyword kw">super</span>
<span class="ruby-identifier">klone</span>.<span class="ruby-identifier">states</span> = <span class="ruby-identifier">states</span>.<span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span>.<span class="ruby-identifier">events</span> = <span class="ruby-identifier">events</span>.<span class="ruby-identifier">clone</span>
<span class="ruby-identifier">klone</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000057">
<a name="M000057"></a><b>create_state</b>(name, options)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_machine.rb#L29" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000057_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_machine.rb, line 29</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">create_state</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>)
<span class="ruby-ivar">@states</span> <span class="ruby-operator">&lt;&lt;</span> <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">SupportingClasses</span><span class="ruby-operator">::</span><span class="ruby-constant">State</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-ivar">@states</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">name</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>

View file

@ -21,11 +21,7 @@
</h1>
<ul class="files">
<li><a href="../../files/lib/aasm/event_rb.html">lib/aasm/event.rb</a></li>
<li><a href="../../files/lib/aasm/state_rb.html">lib/aasm/state.rb</a></li>
<li><a href="../../files/lib/aasm/state_transition_rb.html">lib/aasm/state_transition.rb</a></li>
<li><a href="../../files/lib/aasm/supporting_classes_rb.html">lib/aasm/supporting_classes.rb</a></li>
</ul>
</div>

View file

@ -49,7 +49,7 @@
<dd>
<ul>
<li><a href="#M000020">==</a></li>
<li><a href="#M000024">==</a></li>
</ul>
</dd>
@ -58,7 +58,7 @@
<dd>
<ul>
<li><a href="#M000018">all_transitions</a></li>
<li><a href="#M000020">all_transitions</a></li>
</ul>
</dd>
@ -67,7 +67,7 @@
<dd>
<ul>
<li><a href="#M000019">call_action</a></li>
<li><a href="#M000021">call_action</a></li>
</ul>
</dd>
@ -76,7 +76,9 @@
<dd>
<ul>
<li><a href="#M000025">execute_success_callback</a></li>
<li><a href="#M000027">execute_error_callback</a>,</li>
<li><a href="#M000026">execute_success_callback</a></li>
</ul>
</dd>
@ -85,7 +87,7 @@
<dd>
<ul>
<li><a href="#M000010">fire</a></li>
<li><a href="#M000015">fire</a></li>
</ul>
</dd>
@ -94,7 +96,7 @@
<dd>
<ul>
<li><a href="#M000009">new</a></li>
<li><a href="#M000014">new</a></li>
</ul>
</dd>
@ -103,9 +105,9 @@
<dd>
<ul>
<li><a href="#M000014">transitions_from_state</a>,</li>
<li><a href="#M000019">transitions_from_state</a>,</li>
<li><a href="#M000013">transitions_from_state?</a></li>
<li><a href="#M000018">transitions_from_state?</a></li>
</ul>
</dd>
@ -114,7 +116,7 @@
<dd>
<ul>
<li><a href="#M000021">update</a></li>
<li><a href="#M000025">update</a></li>
</ul>
</dd>
@ -164,203 +166,10 @@
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000009">
<a name="M000009"></a><b>new</b>(name, options = {}, &amp;block)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000009_source')" id="l_M000009_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L8" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000009_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 8</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-ivar">@transitions</span> = []
<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000020">
<a name="M000020"></a><b>==</b>(event)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L49" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000020_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 49</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">event</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">event</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">name</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000018">
<a name="M000018"></a><b>all_transitions</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L38" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000018_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 38</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_transitions</span>
<span class="ruby-ivar">@transitions</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000019">
<a name="M000019"></a><b>call_action</b>(action, record)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L42" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000019_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 42</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-identifier">action</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">action</span>]
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">record</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000025">
<a name="M000025"></a><b>execute_success_callback</b>(obj, success = nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L68" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000025_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 68</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute_success_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">success</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">callback</span> = <span class="ruby-identifier">success</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@success</span>
<span class="ruby-keyword kw">case</span>(<span class="ruby-identifier">callback</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">callback</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Proc</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">meth</span><span class="ruby-operator">|</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">execute_success_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth</span>)}
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000010">
<a name="M000010"></a><b>fire</b>(obj, to_state=nil, *args)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000010_source')" id="l_M000010_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L14" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000010_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 14</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fire</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">to_state</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">transitions</span> = <span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">aasm_current_state</span> }
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidTransition</span>, <span class="ruby-node">&quot;Event '#{name}' cannot transition from '#{obj.aasm_current_state}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transitions</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
<span class="ruby-identifier">next_state</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">transitions</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">transition</span><span class="ruby-operator">|</span>
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_state</span> <span class="ruby-keyword kw">and</span> <span class="ruby-operator">!</span><span class="ruby-constant">Array</span>(<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">to</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">to_state</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transition</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-identifier">next_state</span> = <span class="ruby-identifier">to_state</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">to</span>).<span class="ruby-identifier">first</span>
<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">break</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">next_state</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000014">
<a name="M000014"></a><b>transitions_from_state</b>(state)
<a name="M000014"></a><b>new</b>(name, options = {}, &amp;block)
</div>
@ -371,23 +180,27 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000014_source')" id="l_M000014_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L34" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L4" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000014_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transitions_from_state</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span> }
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 4</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-ivar">@transitions</span> = []
<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000013">
<div class="title" id="M000024">
<a name="M000013"></a><b>transitions_from_state?</b>(state)
<a name="M000024"></a><b>==</b>(event)
</div>
@ -396,16 +209,47 @@
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000013_source')" id="l_M000013_source">show</a>
Source: <a href="javascript:toggleSource('M000024_source')" id="l_M000024_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L30" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L45" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000013_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 30</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transitions_from_state?</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span> }
<span class="ruby-keyword kw">end</span></pre>
<div id="M000024_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 45</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">event</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">event</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">event</span>.<span class="ruby-identifier">name</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000020">
<a name="M000020"></a><b>all_transitions</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000020_source')" id="l_M000020_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L34" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000020_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">all_transitions</span>
<span class="ruby-ivar">@transitions</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -414,7 +258,7 @@
<div class="method">
<div class="title" id="M000021">
<a name="M000021"></a><b>update</b>(options = {}, &amp;block)
<a name="M000021"></a><b>call_action</b>(action, record)
</div>
@ -425,21 +269,219 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000021_source')" id="l_M000021_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/event.rb#L57" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L38" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000021_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 57</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:success</span>) <span class="ruby-keyword kw">then</span>
<span class="ruby-ivar">@success</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:success</span>]
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">then</span>
<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
<span class="ruby-keyword kw">self</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 38</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-identifier">action</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">action</span>]
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">record</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000027">
<a name="M000027"></a><b>execute_error_callback</b>(obj, error, error_callback=nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000027_source')" id="l_M000027_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L79" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000027_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 79</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute_error_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">error</span>, <span class="ruby-identifier">error_callback</span>=<span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">callback</span> = <span class="ruby-identifier">error_callback</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@error</span>
<span class="ruby-identifier">raise</span> <span class="ruby-identifier">error</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">callback</span>
<span class="ruby-keyword kw">case</span>(<span class="ruby-identifier">callback</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">raise</span> <span class="ruby-constant">NoMethodError</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">to_sym</span>)
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">callback</span>, <span class="ruby-identifier">error</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Proc</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">error</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">meth</span><span class="ruby-operator">|</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">execute_error_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">error</span>, <span class="ruby-identifier">meth</span>)}
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000026">
<a name="M000026"></a><b>execute_success_callback</b>(obj, success = nil)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000026_source')" id="l_M000026_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L67" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000026_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 67</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute_success_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">success</span> = <span class="ruby-keyword kw">nil</span>)
<span class="ruby-identifier">callback</span> = <span class="ruby-identifier">success</span> <span class="ruby-operator">||</span> <span class="ruby-ivar">@success</span>
<span class="ruby-keyword kw">case</span>(<span class="ruby-identifier">callback</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">String</span>, <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">callback</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Proc</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Array</span>
<span class="ruby-identifier">callback</span>.<span class="ruby-identifier">each</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">meth</span><span class="ruby-operator">|</span><span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">execute_success_callback</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">meth</span>)}
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000015">
<a name="M000015"></a><b>fire</b>(obj, to_state=nil, *args)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000015_source')" id="l_M000015_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L10" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000015_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 10</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fire</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">to_state</span>=<span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-identifier">transitions</span> = <span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">aasm_current_state</span> }
<span class="ruby-identifier">raise</span> <span class="ruby-constant">AASM</span><span class="ruby-operator">::</span><span class="ruby-constant">InvalidTransition</span>, <span class="ruby-node">&quot;Event '#{name}' cannot transition from '#{obj.aasm_current_state}'&quot;</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transitions</span>.<span class="ruby-identifier">size</span> <span class="ruby-operator">==</span> <span class="ruby-value">0</span>
<span class="ruby-identifier">next_state</span> = <span class="ruby-keyword kw">nil</span>
<span class="ruby-identifier">transitions</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">transition</span><span class="ruby-operator">|</span>
<span class="ruby-keyword kw">next</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">to_state</span> <span class="ruby-keyword kw">and</span> <span class="ruby-operator">!</span><span class="ruby-constant">Array</span>(<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">to</span>).<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">to_state</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">transition</span>.<span class="ruby-identifier">perform</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-identifier">next_state</span> = <span class="ruby-identifier">to_state</span> <span class="ruby-operator">||</span> <span class="ruby-constant">Array</span>(<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">to</span>).<span class="ruby-identifier">first</span>
<span class="ruby-identifier">transition</span>.<span class="ruby-identifier">execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">break</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-identifier">next_state</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000019">
<a name="M000019"></a><b>transitions_from_state</b>(state)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000019_source')" id="l_M000019_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L30" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000019_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 30</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transitions_from_state</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">select</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span> }
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000018">
<a name="M000018"></a><b>transitions_from_state?</b>(state)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000018_source')" id="l_M000018_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L26" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000018_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 26</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">transitions_from_state?</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-ivar">@transitions</span>.<span class="ruby-identifier">any?</span> { <span class="ruby-operator">|</span><span class="ruby-identifier">t</span><span class="ruby-operator">|</span> <span class="ruby-identifier">t</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span> }
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000025">
<a name="M000025"></a><b>update</b>(options = {}, &amp;block)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000025_source')" id="l_M000025_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/event.rb#L53" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000025_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/event.rb, line 53</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span> = {}, <span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:success</span>) <span class="ruby-keyword kw">then</span>
<span class="ruby-ivar">@success</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:success</span>]
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:error</span>) <span class="ruby-keyword kw">then</span>
<span class="ruby-ivar">@error</span> = <span class="ruby-identifier">options</span>[<span class="ruby-identifier">:error</span>]
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block</span> <span class="ruby-keyword kw">then</span>
<span class="ruby-identifier">instance_eval</span>(<span class="ruby-operator">&amp;</span><span class="ruby-identifier">block</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
<span class="ruby-keyword kw">self</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>

View file

@ -49,7 +49,7 @@
<dd>
<ul>
<li><a href="#M000039">==</a></li>
<li><a href="#M000042">==</a></li>
</ul>
</dd>
@ -58,7 +58,7 @@
<dd>
<ul>
<li><a href="#M000040">call_action</a></li>
<li><a href="#M000043">call_action</a></li>
</ul>
</dd>
@ -67,7 +67,7 @@
<dd>
<ul>
<li><a href="#M000041">display_name</a></li>
<li><a href="#M000045">display_name</a></li>
</ul>
</dd>
@ -76,7 +76,7 @@
<dd>
<ul>
<li><a href="#M000042">for_select</a></li>
<li><a href="#M000046">for_select</a></li>
</ul>
</dd>
@ -85,7 +85,7 @@
<dd>
<ul>
<li><a href="#M000036">new</a></li>
<li><a href="#M000041">new</a></li>
</ul>
</dd>
@ -94,7 +94,7 @@
<dd>
<ul>
<li><a href="#M000045">update</a></li>
<li><a href="#M000047">update</a></li>
</ul>
</dd>
@ -136,101 +136,10 @@
<div class="sectiontitle">Class Public methods</div>
<div class="method">
<div class="title" id="M000036">
<a name="M000036"></a><b>new</b>(name, options={})
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000036_source')" id="l_M000036_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L6" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000036_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 6</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>={})
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000039">
<a name="M000039"></a><b>==</b>(state)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000039_source')" id="l_M000039_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L11" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000039_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 11</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">name</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000040">
<a name="M000040"></a><b>call_action</b>(action, record)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000040_source')" id="l_M000040_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L19" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000040_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 19</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-identifier">action</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">action</span>]
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">record</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000041">
<a name="M000041"></a><b>display_name</b>()
<a name="M000041"></a><b>new</b>(name, options={})
</div>
@ -241,23 +150,26 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000041_source')" id="l_M000041_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L26" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L4" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000041_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 26</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_name</span>
<span class="ruby-ivar">@display_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/_/</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">capitalize</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 4</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">name</span>, <span class="ruby-identifier">options</span>={})
<span class="ruby-ivar">@name</span> = <span class="ruby-identifier">name</span>
<span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000042">
<a name="M000042"></a><b>for_select</b>()
<a name="M000042"></a><b>==</b>(state)
</div>
@ -268,14 +180,50 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000042_source')" id="l_M000042_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L30" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L9" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000042_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 30</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">for_select</span>
[<span class="ruby-identifier">display_name</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>]
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 9</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">state</span>)
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">is_a?</span> <span class="ruby-constant">Symbol</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span>
<span class="ruby-keyword kw">else</span>
<span class="ruby-identifier">name</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">state</span>.<span class="ruby-identifier">name</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000043">
<a name="M000043"></a><b>call_action</b>(action, record)
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000043_source')" id="l_M000043_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L17" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000043_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 17</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-identifier">action</span> = <span class="ruby-ivar">@options</span>[<span class="ruby-identifier">action</span>]
<span class="ruby-identifier">catch</span> <span class="ruby-identifier">:halt_aasm_chain</span> <span class="ruby-keyword kw">do</span>
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-identifier">action</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">a</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">a</span>, <span class="ruby-identifier">record</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_call_action</span>(<span class="ruby-identifier">action</span>, <span class="ruby-identifier">record</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -284,7 +232,7 @@
<div class="method">
<div class="title" id="M000045">
<a name="M000045"></a><b>update</b>(options = {})
<a name="M000045"></a><b>display_name</b>()
</div>
@ -295,18 +243,72 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000045_source')" id="l_M000045_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state.rb#L34" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L26" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000045_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 26</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">display_name</span>
<span class="ruby-ivar">@display_name</span> <span class="ruby-operator">||=</span> <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/_/</span>, <span class="ruby-value str">' '</span>).<span class="ruby-identifier">capitalize</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000046">
<a name="M000046"></a><b>for_select</b>()
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000046_source')" id="l_M000046_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L30" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000046_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 30</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">for_select</span>
[<span class="ruby-identifier">display_name</span>, <span class="ruby-identifier">name</span>.<span class="ruby-identifier">to_s</span>]
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000047">
<a name="M000047"></a><b>update</b>(options = {})
</div>
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000047_source')" id="l_M000047_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/bb32281d2dfe7e1d2f6fba684fa8e913c5cdb025/lib/aasm/state.rb#L34" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000047_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state.rb, line 34</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:display</span>) <span class="ruby-keyword kw">then</span>
<span class="ruby-ivar">@display_name</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:display</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
<span class="ruby-keyword kw">self</span>
<span class="ruby-keyword kw">end</span></pre>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">update</span>(<span class="ruby-identifier">options</span> = {})
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">options</span>.<span class="ruby-identifier">key?</span>(<span class="ruby-identifier">:display</span>) <span class="ruby-keyword kw">then</span>
<span class="ruby-ivar">@display_name</span> = <span class="ruby-identifier">options</span>.<span class="ruby-identifier">delete</span>(<span class="ruby-identifier">:display</span>)
<span class="ruby-keyword kw">end</span>
<span class="ruby-ivar">@options</span> = <span class="ruby-identifier">options</span>
<span class="ruby-keyword kw">self</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>

View file

@ -49,7 +49,7 @@
<dd>
<ul>
<li><a href="#M000057">==</a></li>
<li><a href="#M000058">==</a></li>
</ul>
</dd>
@ -67,7 +67,7 @@
<dd>
<ul>
<li><a href="#M000058">from?</a></li>
<li><a href="#M000059">from?</a></li>
</ul>
</dd>
@ -149,15 +149,15 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000054_source')" id="l_M000054_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_transition.rb#L7" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_transition.rb#L5" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000054_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 7</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span>)
<span class="ruby-ivar">@from</span>, <span class="ruby-ivar">@to</span>, <span class="ruby-ivar">@guard</span>, <span class="ruby-ivar">@on_transition</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:from</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:to</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:guard</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:on_transition</span>]
<span class="ruby-ivar">@opts</span> = <span class="ruby-identifier">opts</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 5</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">opts</span>)
<span class="ruby-ivar">@from</span>, <span class="ruby-ivar">@to</span>, <span class="ruby-ivar">@guard</span>, <span class="ruby-ivar">@on_transition</span> = <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:from</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:to</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:guard</span>], <span class="ruby-identifier">opts</span>[<span class="ruby-identifier">:on_transition</span>]
<span class="ruby-ivar">@opts</span> = <span class="ruby-identifier">opts</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -166,9 +166,9 @@
<div class="sectiontitle">Instance Public methods</div>
<div class="method">
<div class="title" id="M000057">
<div class="title" id="M000058">
<a name="M000057"></a><b>==</b>(obj)
<a name="M000058"></a><b>==</b>(obj)
</div>
@ -177,16 +177,16 @@
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000057_source')" id="l_M000057_source">show</a>
Source: <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_transition.rb#L29" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_transition.rb#L27" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000057_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 29</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-ivar">@from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@to</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">to</span>
<span class="ruby-keyword kw">end</span></pre>
<div id="M000058_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 27</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-operator">==</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-ivar">@from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">from</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@to</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">obj</span>.<span class="ruby-identifier">to</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -206,25 +206,25 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000056_source')" id="l_M000056_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_transition.rb#L23" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_transition.rb#L21" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000056_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 23</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-ivar">@on_transition</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-ivar">@on_transition</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ot</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">ot</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-ivar">@on_transition</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 21</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-ivar">@on_transition</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Array</span>) <span class="ruby-operator">?</span>
<span class="ruby-ivar">@on_transition</span>.<span class="ruby-identifier">each</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">ot</span><span class="ruby-operator">|</span> <span class="ruby-identifier">_execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-identifier">ot</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)} <span class="ruby-operator">:</span>
<span class="ruby-identifier">_execute</span>(<span class="ruby-identifier">obj</span>, <span class="ruby-ivar">@on_transition</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
</div>
<div class="method">
<div class="title" id="M000058">
<div class="title" id="M000059">
<a name="M000058"></a><b>from?</b>(value)
<a name="M000059"></a><b>from?</b>(value)
</div>
@ -233,16 +233,16 @@
<div class="sourcecode">
<p class="source-link">
Source: <a href="javascript:toggleSource('M000058_source')" id="l_M000058_source">show</a>
Source: <a href="javascript:toggleSource('M000059_source')" id="l_M000059_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_transition.rb#L33" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_transition.rb#L31" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000058_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 33</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from?</span>(<span class="ruby-identifier">value</span>)
<span class="ruby-ivar">@from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span>
<span class="ruby-keyword kw">end</span></pre>
<div id="M000059_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 31</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">from?</span>(<span class="ruby-identifier">value</span>)
<span class="ruby-ivar">@from</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">value</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>
@ -262,21 +262,21 @@
<p class="source-link">
Source: <a href="javascript:toggleSource('M000055_source')" id="l_M000055_source">show</a>
| <a href="http://github.com/rubyist/aasm/blob/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/state_transition.rb#L12" target="_blank" class="github_url">on GitHub</a>
| <a href="http://github.com/rubyist/aasm/blob/ef0eb257158eb52277a8b543a7d238dbaa326303/lib/aasm/state_transition.rb#L10" target="_blank" class="github_url">on GitHub</a>
</p>
<div id="M000055_source" class="dyn-source">
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 12</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@guard</span>
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Symbol</span>, <span class="ruby-constant">String</span>
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-ivar">@guard</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Proc</span>
<span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">else</span>
<span class="ruby-keyword kw">true</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
<pre><span class="ruby-comment cmt"># File lib/aasm/state_transition.rb, line 10</span>
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">perform</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">case</span> <span class="ruby-ivar">@guard</span>
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Symbol</span>, <span class="ruby-constant">String</span>
<span class="ruby-identifier">obj</span>.<span class="ruby-identifier">send</span>(<span class="ruby-ivar">@guard</span>)
<span class="ruby-keyword kw">when</span> <span class="ruby-constant">Proc</span>
<span class="ruby-ivar">@guard</span>.<span class="ruby-identifier">call</span>(<span class="ruby-identifier">obj</span>)
<span class="ruby-keyword kw">else</span>
<span class="ruby-keyword kw">true</span>
<span class="ruby-keyword kw">end</span>
<span class="ruby-keyword kw">end</span></pre>
</div>
</div>

View file

@ -1 +1 @@
Fri, 23 Oct 2009 16:40:51 -0400
Sun, 17 Jan 2010 01:33:48 -0500

View file

@ -47,6 +47,21 @@ h4 {
font-size: 1em;
}
table
{
margin-bottom: 1em;
}
td, th
{
padding: 0 0.7em 0.3em 0;
}
th
{
font-weight: bold;
}
.clear
{
clear: both;

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>README.rdoc</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
@ -100,7 +100,8 @@ href="http://github.com/rubyist/aasm/tree/master">github.com/rubyist/aasm/tree/m
</pre>
<h3>Building your own gems</h3>
<pre>
% rake gem
% rake gemspec
% rake build
% sudo gem install pkg/aasm-2.1.gem
</pre>
<h2>Simple Example</h2>
@ -111,6 +112,8 @@ Here&#8217;s a quick example highlighting some of the features.
class Conversation
include AASM
aasm_column :current_state # defaults to aasm_state
aasm_initial_state :unread
aasm_state :unread
@ -134,6 +137,8 @@ This example uses a few of the more complex features available.
class Relationship
include AASM
aasm_column :status
aasm_initial_state Proc.new { |relationship| relationship.strictly_for_fun? ? :intimate : :dating }
aasm_state :dating, :enter =&gt; :make_happy, :exit =&gt; :make_depressed

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/aasm.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:31:37 -0500 2010</li>
</ul>
</div>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/event.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:31:37 -0500 2010</li>
</ul>
</div>
@ -40,13 +40,6 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/persistence/active_record_persistence.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Fri Oct 23 16:43:49 -0400 2009</li>
</ul>
</div>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/persistence.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
@ -40,13 +40,6 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/state_machine.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
@ -28,13 +28,6 @@
<div class="sectiontitle">Required Files</div>
<ul>
<li>ostruct</li>
</ul>
@ -47,13 +40,6 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/state.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:31:37 -0500 2010</li>
</ul>
</div>
@ -40,13 +40,6 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm/state_transition.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
@ -40,13 +40,6 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -0,0 +1,52 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>supporting_classes.rb</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="../../../css/reset.css" type="text/css" media="screen" />
<link rel="stylesheet" href="../../../css/main.css" type="text/css" media="screen" />
<script src="../../../js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/jquery-effect.js" type="text/javascript" charset="utf-8"></script>
<script src="../../../js/main.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<div class="banner">
<h1>
supporting_classes.rb
</h1>
<ul class="files">
<li>lib/aasm/supporting_classes.rb</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
<div id="bodyContent">
<div id="content">
</div>
</div>
</body>
</html>

View file

@ -19,7 +19,7 @@
</h1>
<ul class="files">
<li>lib/aasm.rb</li>
<li>Last modified: Fri Oct 23 16:40:42 -0400 2009</li>
<li>Last modified: Sun Jan 17 01:17:01 -0500 2010</li>
</ul>
</div>
@ -28,6 +28,13 @@
<div class="sectiontitle">Required Files</div>
<ul>
<li>ostruct</li>
</ul>
@ -40,6 +47,13 @@
<div class="sectiontitle">Classes and Modules</div>
<ul>
<li><span class="type">MODULE</span> <a href="../../classes/AASM.html">AASM</a></li>
</ul>

View file

@ -5,7 +5,7 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>aasm 2.1.3
<title>aasm 2.1.4
</title>
</head>
<frameset cols="300,*" frameborder="1" border="1" bordercolor="#666666" framespacing="1">

File diff suppressed because one or more lines are too long

View file

@ -1 +1 @@
var tree = [["","","files",[["README.rdoc","files/README_rdoc.html","",[]],["","","lib",[["","","aasm",[["aasm.rb","files/lib/aasm/aasm_rb.html","",[]],["event.rb","files/lib/aasm/event_rb.html","",[]],["","","persistence",[["active_record_persistence.rb","files/lib/aasm/persistence/active_record_persistence_rb.html","",[]]]],["persistence.rb","files/lib/aasm/persistence_rb.html","",[]],["state.rb","files/lib/aasm/state_rb.html","",[]],["state_machine.rb","files/lib/aasm/state_machine_rb.html","",[]],["state_transition.rb","files/lib/aasm/state_transition_rb.html","",[]]]],["aasm.rb","files/lib/aasm_rb.html","",[]]]]]],["AASM","classes/AASM.html","",[["ClassMethods","classes/AASM/ClassMethods.html","",[]],["InvalidTransition","classes/AASM/InvalidTransition.html"," < RuntimeError",[]],["Persistence","classes/AASM/Persistence.html","",[["ActiveRecordPersistence","classes/AASM/Persistence/ActiveRecordPersistence.html","",[["ClassMethods","classes/AASM/Persistence/ActiveRecordPersistence/ClassMethods.html","",[]],["InstanceMethods","classes/AASM/Persistence/ActiveRecordPersistence/InstanceMethods.html","",[]],["NamedScopeMethods","classes/AASM/Persistence/ActiveRecordPersistence/NamedScopeMethods.html","",[]],["ReadState","classes/AASM/Persistence/ActiveRecordPersistence/ReadState.html","",[]],["WriteState","classes/AASM/Persistence/ActiveRecordPersistence/WriteState.html","",[]],["WriteStateWithoutPersistence","classes/AASM/Persistence/ActiveRecordPersistence/WriteStateWithoutPersistence.html","",[]]]]]],["StateMachine","classes/AASM/StateMachine.html"," < Object",[]],["SupportingClasses","classes/AASM/SupportingClasses.html","",[["Event","classes/AASM/SupportingClasses/Event.html"," < Object",[]],["State","classes/AASM/SupportingClasses/State.html"," < Object",[]],["StateTransition","classes/AASM/SupportingClasses/StateTransition.html"," < Object",[]]]],["UndefinedState","classes/AASM/UndefinedState.html"," < RuntimeError",[]]]]]
var tree = [["","","files",[["README.rdoc","files/README_rdoc.html","",[]],["","","lib",[["","","aasm",[["aasm.rb","files/lib/aasm/aasm_rb.html","",[]],["event.rb","files/lib/aasm/event_rb.html","",[]],["","","persistence",[["active_record_persistence.rb","files/lib/aasm/persistence/active_record_persistence_rb.html","",[]]]],["persistence.rb","files/lib/aasm/persistence_rb.html","",[]],["state.rb","files/lib/aasm/state_rb.html","",[]],["state_machine.rb","files/lib/aasm/state_machine_rb.html","",[]],["state_transition.rb","files/lib/aasm/state_transition_rb.html","",[]],["supporting_classes.rb","files/lib/aasm/supporting_classes_rb.html","",[]]]],["aasm.rb","files/lib/aasm_rb.html","",[]]]]]],["AASM","classes/AASM.html","",[["ClassMethods","classes/AASM/ClassMethods.html","",[]],["InvalidTransition","classes/AASM/InvalidTransition.html"," < RuntimeError",[]],["Persistence","classes/AASM/Persistence.html","",[["ActiveRecordPersistence","classes/AASM/Persistence/ActiveRecordPersistence.html","",[["ClassMethods","classes/AASM/Persistence/ActiveRecordPersistence/ClassMethods.html","",[]],["InstanceMethods","classes/AASM/Persistence/ActiveRecordPersistence/InstanceMethods.html","",[]],["NamedScopeMethods","classes/AASM/Persistence/ActiveRecordPersistence/NamedScopeMethods.html","",[]],["ReadState","classes/AASM/Persistence/ActiveRecordPersistence/ReadState.html","",[]],["WriteState","classes/AASM/Persistence/ActiveRecordPersistence/WriteState.html","",[]],["WriteStateWithoutPersistence","classes/AASM/Persistence/ActiveRecordPersistence/WriteStateWithoutPersistence.html","",[]]]]]],["StateMachine","classes/AASM/StateMachine.html"," < Object",[]],["SupportingClasses","classes/AASM/SupportingClasses.html","",[["Event","classes/AASM/SupportingClasses/Event.html"," < Object",[]],["State","classes/AASM/SupportingClasses/State.html"," < Object",[]],["StateTransition","classes/AASM/SupportingClasses/StateTransition.html"," < Object",[]]]],["UndefinedState","classes/AASM/UndefinedState.html"," < RuntimeError",[]]]]]