Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
43 changed files
with
6,018 additions
and
1 deletion.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,236 @@ | ||
<?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>AASM</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> | ||
<span class="type">Module</span> | ||
AASM | ||
|
||
</h1> | ||
<ul class="files"> | ||
|
||
<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> | ||
|
||
</ul> | ||
</div> | ||
<div id="bodyContent"> | ||
<div id="content"> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="sectiontitle">Methods</div> | ||
<dl class="methods"> | ||
|
||
<dt>A</dt> | ||
<dd> | ||
<ul> | ||
|
||
<li><a href="#M000011">aasm_current_state</a>,</li> | ||
|
||
<li><a href="#M000012">aasm_enter_initial_state</a>,</li> | ||
|
||
<li><a href="#M000015">aasm_events_for_current_state</a>,</li> | ||
|
||
<li><a href="#M000016">aasm_events_for_state</a></li> | ||
|
||
</ul> | ||
</dd> | ||
|
||
</dl> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="sectiontitle">Classes and Modules</div> | ||
<ul> | ||
|
||
<li><span class="type">MODULE</span> <a href="AASM/ClassMethods.html">AASM::ClassMethods</a></li> | ||
|
||
<li><span class="type">MODULE</span> <a href="AASM/Persistence.html">AASM::Persistence</a></li> | ||
|
||
<li><span class="type">MODULE</span> <a href="AASM/SupportingClasses.html">AASM::SupportingClasses</a></li> | ||
|
||
<li><span class="type">CLASS</span> <a href="AASM/InvalidTransition.html">AASM::InvalidTransition</a></li> | ||
|
||
<li><span class="type">CLASS</span> <a href="AASM/StateMachine.html">AASM::StateMachine</a></li> | ||
|
||
<li><span class="type">CLASS</span> <a href="AASM/UndefinedState.html">AASM::UndefinedState</a></li> | ||
|
||
</ul> | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<div class="sectiontitle">Instance Public methods</div> | ||
|
||
<div class="method"> | ||
<div class="title" id="M000011"> | ||
|
||
<a name="M000011"></a><b>aasm_current_state</b>() | ||
|
||
</div> | ||
|
||
<div class="description"> | ||
<p> | ||
Instance methods | ||
</p> | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
<div class="sourcecode"> | ||
<p class="source-link"> | ||
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#L80" 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> | ||
<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> | ||
|
||
<span class="ruby-keyword kw">if</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">respond_to?</span>(<span class="ruby-identifier">:aasm_read_state</span>) <span class="ruby-operator">||</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">private_methods</span>.<span class="ruby-identifier">include?</span>(<span class="ruby-value str">'aasm_read_state'</span>) | ||
<span class="ruby-ivar">@aasm_current_state</span> = <span class="ruby-identifier">aasm_read_state</span> | ||
<span class="ruby-keyword kw">end</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> | ||
|
||
<span class="ruby-identifier">aasm_enter_initial_state</span> | ||
<span class="ruby-keyword kw">end</span></pre> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="method"> | ||
<div class="title" id="M000012"> | ||
|
||
<a name="M000012"></a><b>aasm_enter_initial_state</b>() | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
<div class="sourcecode"> | ||
<p class="source-link"> | ||
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#L91" 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> | ||
<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>) | ||
|
||
<span class="ruby-identifier">state</span>.<span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">:before_enter</span>, <span class="ruby-keyword kw">self</span>) | ||
<span class="ruby-identifier">state</span>.<span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">:enter</span>, <span class="ruby-keyword kw">self</span>) | ||
<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">aasm_current_state</span> = <span class="ruby-identifier">state_name</span> | ||
<span class="ruby-identifier">state</span>.<span class="ruby-identifier">call_action</span>(<span class="ruby-identifier">:after_enter</span>, <span class="ruby-keyword kw">self</span>) | ||
|
||
<span class="ruby-identifier">state_name</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>aasm_events_for_current_state</b>() | ||
|
||
</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/dc002d4684a481fed59c88b4916f7b0c29354d96/lib/aasm/aasm.rb#L103" 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> | ||
<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> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
<div class="method"> | ||
<div class="title" id="M000016"> | ||
|
||
<a name="M000016"></a><b>aasm_events_for_state</b>(state) | ||
|
||
</div> | ||
|
||
|
||
|
||
|
||
<div class="sourcecode"> | ||
<p class="source-link"> | ||
Source: <a href="javascript:toggleSource('M000016_source')" id="l_M000016_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> | ||
|
||
</p> | ||
<div id="M000016_source" class="dyn-source"> | ||
<pre><span class="ruby-comment cmt"># File lib/aasm/aasm.rb, line 107</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>} | ||
<span class="ruby-keyword kw">end</span></pre> | ||
</div> | ||
</div> | ||
|
||
</div> | ||
|
||
</div> | ||
</div> | ||
</body> | ||
</html> |
Oops, something went wrong.