rask 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,190 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
- <head>
6
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
7
-
8
- <title>Module: Rask::StateMachine::ClassMethods</title>
9
-
10
- <link rel="stylesheet" href="../../rdoc.css" type="text/css" media="screen" />
11
-
12
- <script src="../../js/jquery.js" type="text/javascript"
13
- charset="utf-8"></script>
14
- <script src="../../js/thickbox-compressed.js" type="text/javascript"
15
- charset="utf-8"></script>
16
- <script src="../../js/quicksearch.js" type="text/javascript"
17
- charset="utf-8"></script>
18
- <script src="../../js/darkfish.js" type="text/javascript"
19
- charset="utf-8"></script>
20
-
21
- </head>
22
- <body class="module">
23
-
24
- <div id="metadata">
25
- <div id="file-metadata">
26
- <div id="file-list-section" class="section">
27
- <h3 class="section-header">In Files</h3>
28
- <div class="section-body">
29
- <ul>
30
-
31
- <li><a href="../../lib/rask/state_machine_rb.html?TB_iframe=true&amp;height=550&amp;width=785"
32
- class="thickbox" title="lib/rask/state_machine.rb">lib/rask/state_machine.rb</a></li>
33
-
34
- </ul>
35
- </div>
36
- </div>
37
-
38
-
39
- </div>
40
-
41
- <div id="class-metadata">
42
-
43
- <!-- Parent Class -->
44
-
45
-
46
- <!-- Namespace Contents -->
47
-
48
-
49
- <!-- Method Quickref -->
50
-
51
- <div id="method-list-section" class="section">
52
- <h3 class="section-header">Methods</h3>
53
- <ul class="link-list">
54
-
55
- <li><a href="#M000009">#define_state</a></li>
56
-
57
- </ul>
58
- </div>
59
-
60
-
61
- <!-- Included Modules -->
62
-
63
- </div>
64
-
65
- <div id="project-metadata">
66
-
67
-
68
-
69
- <div id="classindex-section" class="section project-section">
70
- <h3 class="section-header">Class Index
71
- <span class="search-toggle"><img src="../../images/find.png"
72
- height="16" width="16" alt="[+]"
73
- title="show/hide quicksearch" /></span></h3>
74
- <form action="#" method="get" accept-charset="utf-8" class="initially-hidden">
75
- <fieldset>
76
- <legend>Quicksearch</legend>
77
- <input type="text" name="quicksearch" value=""
78
- class="quicksearch-field" />
79
- </fieldset>
80
- </form>
81
-
82
- <ul class="link-list">
83
-
84
- <li><a href="../../Rask.html">Rask</a></li>
85
-
86
- <li><a href="../../Rask/StateMachine.html">Rask::StateMachine</a></li>
87
-
88
- <li><a href="../../Rask/StateMachine/ClassMethods.html">Rask::StateMachine::ClassMethods</a></li>
89
-
90
- <li><a href="../../Rask/Task.html">Rask::Task</a></li>
91
-
92
- </ul>
93
- <div id="no-class-search-results" style="display: none;">No matching classes.</div>
94
- </div>
95
-
96
-
97
- </div>
98
- </div>
99
-
100
- <div id="documentation">
101
- <h1 class="module">Rask::StateMachine::ClassMethods</h1>
102
-
103
- <div id="description">
104
-
105
- </div>
106
-
107
- <!-- Constants -->
108
-
109
-
110
- <!-- Attributes -->
111
-
112
-
113
- <!-- Methods -->
114
-
115
- <div id="public-instance-method-details" class="method-section section">
116
- <h3 class="section-header">Public Instance Methods</h3>
117
-
118
-
119
- <div id="define-state-method" class="method-detail ">
120
- <a name="M000009"></a>
121
-
122
- <div class="method-heading">
123
-
124
- <span class="method-name">define_state</span><span
125
- class="method-args">(name, *args)</span>
126
- <span class="method-click-advice">click to toggle source</span>
127
-
128
- </div>
129
-
130
- <div class="method-description">
131
-
132
- <p class="missing-docs">(Not documented)</p>
133
-
134
-
135
-
136
- <div class="method-source-code"
137
- id="define-state-source">
138
- <pre>
139
- <span class="ruby-comment cmt"># File lib/rask/state_machine.rb, line 57</span>
140
- 57: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">define_state</span>(<span class="ruby-identifier">name</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
141
- 58:
142
- 59: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">instance_eval</span>{
143
- 60: <span class="ruby-identifier">define_method</span>(<span class="ruby-identifier">name</span>){
144
- 61: }
145
- 62: <span class="ruby-identifier">define_method</span>(<span class="ruby-node">&quot;transition_to_#{name}&quot;</span>){
146
- 63: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>)
147
- 64: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-identifier">name</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>][<span class="ruby-identifier">:from</span>] <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>][<span class="ruby-identifier">:from</span>].<span class="ruby-identifier">include?</span>(<span class="ruby-identifier">state</span>)
148
- 65: <span class="ruby-keyword kw">else</span>
149
- 66: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span> = <span class="ruby-identifier">name</span>
150
- 67: <span class="ruby-keyword kw">end</span>
151
- 68: }
152
- 69: <span class="ruby-identifier">define_method</span>(<span class="ruby-node">&quot;#{name}?&quot;</span>){
153
- 70: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">state</span> <span class="ruby-operator">==</span> <span class="ruby-identifier">name</span>
154
- 71: }
155
- 72: <span class="ruby-keyword kw">if</span> <span class="ruby-operator">!</span><span class="ruby-identifier">method_defined?</span>(<span class="ruby-identifier">name</span>) <span class="ruby-operator">||</span> ( <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>].<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Hash</span>) <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>][<span class="ruby-identifier">:initial</span>] )
156
- 73: <span class="ruby-identifier">define_method</span>(<span class="ruby-value str">&quot;initial_state&quot;</span>) {
157
- 74: <span class="ruby-identifier">name</span>
158
- 75: }
159
- 76: <span class="ruby-keyword kw">end</span>
160
- 77: }
161
- 78: <span class="ruby-keyword kw">end</span></pre>
162
- </div>
163
-
164
- </div>
165
-
166
-
167
- </div>
168
-
169
-
170
- </div>
171
-
172
-
173
- </div>
174
-
175
-
176
- <div id="rdoc-debugging-section-dump" class="debugging-section">
177
-
178
- <p>Disabled; run with --debug to generate this.</p>
179
-
180
- </div>
181
-
182
- <div id="validator-badges">
183
- <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
184
- <p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
185
- Rdoc Generator</a> 1.1.6</small>.</p>
186
- </div>
187
-
188
- </body>
189
- </html>
190
-
@@ -1,57 +0,0 @@
1
- <?xml version="1.0" encoding="utf-8"?>
2
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
3
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4
-
5
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
6
- <head>
7
- <meta content="text/html; charset=utf-8" http-equiv="Content-Type" />
8
-
9
- <title>File: state_machine.rb [RDoc Documentation]</title>
10
-
11
- <link type="text/css" media="screen" href="../../rdoc.css" rel="stylesheet" />
12
-
13
- <script src="../../js/jquery.js" type="text/javascript"
14
- charset="utf-8"></script>
15
- <script src="../../js/thickbox-compressed.js" type="text/javascript"
16
- charset="utf-8"></script>
17
- <script src="../../js/quicksearch.js" type="text/javascript"
18
- charset="utf-8"></script>
19
- <script src="../../js/darkfish.js" type="text/javascript"
20
- charset="utf-8"></script>
21
- </head>
22
-
23
- <body class="file file-popup">
24
- <div id="metadata">
25
- <dl>
26
- <dt class="modified-date">Last Modified</dt>
27
- <dd class="modified-date">Tue Feb 09 01:15:09 +0900 2010</dd>
28
-
29
-
30
- <dt class="requires">Requires</dt>
31
- <dd class="requires">
32
- <ul>
33
-
34
- <li>thread</li>
35
-
36
- </ul>
37
- </dd>
38
-
39
-
40
-
41
- </dl>
42
- </div>
43
-
44
- <div id="documentation">
45
-
46
- <div class="description">
47
- <h2>Description</h2>
48
- <p>
49
- <a href="../../Rask.html">Rask</a> StateMachinelibrary &#169;2010 mewlist
50
- </p>
51
-
52
- </div>
53
-
54
- </div>
55
- </body>
56
- </html>
57
-