mack-data_mapper 0.6.1.1 → 0.6.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (32) hide show
  1. data/doc/classes/DataMapper/Resource.html +154 -0
  2. data/doc/classes/DataMapper/Timestamp.html +105 -0
  3. data/doc/classes/Mack/Database.html +210 -0
  4. data/doc/classes/Mack/Testing/DataMapperHelpers.html +151 -0
  5. data/doc/classes/Mack/Testing/Helpers.html +118 -0
  6. data/doc/classes/Mack/ViewHelpers/DataMapperHelpers.html +281 -0
  7. data/doc/classes/Mack.html +127 -0
  8. data/doc/classes/MigrationGenerator.html +161 -0
  9. data/doc/classes/ModelGenerator.html +183 -0
  10. data/doc/classes/ScaffoldGenerator.html +123 -0
  11. data/doc/created.rid +1 -0
  12. data/doc/files/README.html +230 -0
  13. data/doc/files/lib/mack-data_mapper/database_rb.html +101 -0
  14. data/doc/files/lib/mack-data_mapper/dm_patches/dm-timestamps_rb.html +101 -0
  15. data/doc/files/lib/mack-data_mapper/dm_patches/migrations_rb.html +101 -0
  16. data/doc/files/lib/mack-data_mapper/genosaurus_helpers_rb.html +101 -0
  17. data/doc/files/lib/mack-data_mapper/helpers/orm_helpers_rb.html +101 -0
  18. data/doc/files/lib/mack-data_mapper/migration_generator/migration_generator_rb.html +151 -0
  19. data/doc/files/lib/mack-data_mapper/model_column_rb.html +101 -0
  20. data/doc/files/lib/mack-data_mapper/model_generator/model_generator_rb.html +173 -0
  21. data/doc/files/lib/mack-data_mapper/resource_rb.html +101 -0
  22. data/doc/files/lib/mack-data_mapper/runner_rb.html +101 -0
  23. data/doc/files/lib/mack-data_mapper/scaffold_generator/scaffold_generator_rb.html +114 -0
  24. data/doc/files/lib/mack-data_mapper/test_extensions_rb.html +109 -0
  25. data/doc/files/lib/mack-data_mapper_rb.html +109 -0
  26. data/doc/files/lib/mack-data_mapper_tasks_rb.html +101 -0
  27. data/doc/fr_class_index.html +36 -0
  28. data/doc/fr_file_index.html +41 -0
  29. data/doc/fr_method_index.html +35 -0
  30. data/doc/index.html +24 -0
  31. data/doc/rdoc-style.css +208 -0
  32. metadata +33 -2
@@ -0,0 +1,154 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: DataMapper::Resource</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">DataMapper::Resource</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mack-data_mapper/resource_rb.html">
59
+ lib/mack-data_mapper/resource.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000001">to_param</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Instance methods</h3>
104
+
105
+ <div id="method-M000001" class="method-detail">
106
+ <a name="M000001"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="#M000001" class="method-signature">
110
+ <span class="method-name">to_param</span><span class="method-args">()</span>
111
+ </a>
112
+ </div>
113
+
114
+ <div class="method-description">
115
+ <p>
116
+ Returns the key of the <a href="Resource.html">DataMapper::Resource</a>
117
+ object when passed into a url helper
118
+ </p>
119
+ <p>
120
+ Example:
121
+ </p>
122
+ <pre>
123
+ class User
124
+ include DataMapper::Resource
125
+ property :name, String, :key =&gt; true
126
+ end
127
+ users_show_url(User.new(:username =&gt; &quot;markbates&quot;)) # =&gt; /users/markbates
128
+ </pre>
129
+ <p><a class="source-toggle" href="#"
130
+ onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
131
+ <div class="method-source-code" id="M000001-source">
132
+ <pre>
133
+ <span class="ruby-comment cmt"># File lib/mack-data_mapper/resource.rb, line 12</span>
134
+ 12: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_param</span>
135
+ 13: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">key</span>
136
+ 14: <span class="ruby-keyword kw">end</span>
137
+ </pre>
138
+ </div>
139
+ </div>
140
+ </div>
141
+
142
+
143
+ </div>
144
+
145
+
146
+ </div>
147
+
148
+
149
+ <div id="validator-badges">
150
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
151
+ </div>
152
+
153
+ </body>
154
+ </html>
@@ -0,0 +1,105 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: DataMapper::Timestamp</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">DataMapper::Timestamp</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mack-data_mapper/dm_patches/dm-timestamps_rb.html">
59
+ lib/mack-data_mapper/dm_patches/dm-timestamps.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+
80
+ </div>
81
+
82
+
83
+ <!-- if includes -->
84
+
85
+ <div id="section">
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+ <!-- if method_list -->
95
+
96
+
97
+ </div>
98
+
99
+
100
+ <div id="validator-badges">
101
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
102
+ </div>
103
+
104
+ </body>
105
+ </html>
@@ -0,0 +1,210 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::Database</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Database</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../files/lib/mack-data_mapper/database_rb.html">
59
+ lib/mack-data_mapper/database.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000007">create</a>&nbsp;&nbsp;
84
+ <a href="#M000008">drop</a>&nbsp;&nbsp;
85
+ <a href="#M000006">establish_connection</a>&nbsp;&nbsp;
86
+ </div>
87
+ </div>
88
+
89
+ </div>
90
+
91
+
92
+ <!-- if includes -->
93
+
94
+ <div id="section">
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+ <!-- if method_list -->
104
+ <div id="methods">
105
+ <h3 class="section-bar">Public Class methods</h3>
106
+
107
+ <div id="method-M000007" class="method-detail">
108
+ <a name="M000007"></a>
109
+
110
+ <div class="method-heading">
111
+ <a href="#M000007" class="method-signature">
112
+ <span class="method-name">create</span><span class="method-args">(env = Mack.env, repis = :default)</span>
113
+ </a>
114
+ </div>
115
+
116
+ <div class="method-description">
117
+ <p>
118
+ Creates a database, if it doesn&#8216;t already exist for the specified
119
+ environment
120
+ </p>
121
+ <p><a class="source-toggle" href="#"
122
+ onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
123
+ <div class="method-source-code" id="M000007-source">
124
+ <pre>
125
+ <span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 20</span>
126
+ 20: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">create</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
127
+ 21: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
128
+ 22: <span class="ruby-identifier">create_database</span>(<span class="ruby-identifier">repis</span>)
129
+ 23: <span class="ruby-keyword kw">end</span>
130
+ </pre>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <div id="method-M000008" class="method-detail">
136
+ <a name="M000008"></a>
137
+
138
+ <div class="method-heading">
139
+ <a href="#M000008" class="method-signature">
140
+ <span class="method-name">drop</span><span class="method-args">(env = Mack.env, repis = :default)</span>
141
+ </a>
142
+ </div>
143
+
144
+ <div class="method-description">
145
+ <p>
146
+ Drops a database, if it exists for the specified environment
147
+ </p>
148
+ <p><a class="source-toggle" href="#"
149
+ onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
150
+ <div class="method-source-code" id="M000008-source">
151
+ <pre>
152
+ <span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 26</span>
153
+ 26: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">drop</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>, <span class="ruby-identifier">repis</span> = <span class="ruby-identifier">:default</span>)
154
+ 27: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Database</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span>)
155
+ 28: <span class="ruby-identifier">drop_database</span>(<span class="ruby-identifier">repis</span>)
156
+ 29: <span class="ruby-keyword kw">end</span>
157
+ </pre>
158
+ </div>
159
+ </div>
160
+ </div>
161
+
162
+ <div id="method-M000006" class="method-detail">
163
+ <a name="M000006"></a>
164
+
165
+ <div class="method-heading">
166
+ <a href="#M000006" class="method-signature">
167
+ <span class="method-name">establish_connection</span><span class="method-args">(env = Mack.env)</span>
168
+ </a>
169
+ </div>
170
+
171
+ <div class="method-description">
172
+ <p>
173
+ Sets up and establishes connections to the database based on the specified
174
+ environment and the settings in the database.yml file.
175
+ </p>
176
+ <p><a class="source-toggle" href="#"
177
+ onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
178
+ <div class="method-source-code" id="M000006-source">
179
+ <pre>
180
+ <span class="ruby-comment cmt"># File lib/mack-data_mapper/database.rb, line 6</span>
181
+ 6: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">establish_connection</span>(<span class="ruby-identifier">env</span> = <span class="ruby-constant">Mack</span>.<span class="ruby-identifier">env</span>)
182
+ 7: <span class="ruby-identifier">dbs</span> = <span class="ruby-constant">YAML</span><span class="ruby-operator">::</span><span class="ruby-identifier">load</span>(<span class="ruby-constant">ERB</span>.<span class="ruby-identifier">new</span>(<span class="ruby-constant">IO</span>.<span class="ruby-identifier">read</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">Mack</span>.<span class="ruby-identifier">root</span>, <span class="ruby-value str">&quot;config&quot;</span>, <span class="ruby-value str">&quot;database.yml&quot;</span>))).<span class="ruby-identifier">result</span>)
183
+ 8: <span class="ruby-identifier">settings</span> = <span class="ruby-identifier">dbs</span>[<span class="ruby-identifier">env</span>]
184
+ 9: <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">symbolize_keys!</span>
185
+ 10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">settings</span>[<span class="ruby-identifier">:default</span>]
186
+ 11: <span class="ruby-identifier">settings</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">k</span>,<span class="ruby-identifier">v</span><span class="ruby-operator">|</span>
187
+ 12: <span class="ruby-constant">DataMapper</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-identifier">k</span>, <span class="ruby-identifier">v</span>.<span class="ruby-identifier">symbolize_keys</span>)
188
+ 13: <span class="ruby-keyword kw">end</span>
189
+ 14: <span class="ruby-keyword kw">else</span>
190
+ 15: <span class="ruby-constant">DataMapper</span>.<span class="ruby-identifier">setup</span>(<span class="ruby-identifier">:default</span>, <span class="ruby-identifier">settings</span>)
191
+ 16: <span class="ruby-keyword kw">end</span>
192
+ 17: <span class="ruby-keyword kw">end</span>
193
+ </pre>
194
+ </div>
195
+ </div>
196
+ </div>
197
+
198
+
199
+ </div>
200
+
201
+
202
+ </div>
203
+
204
+
205
+ <div id="validator-badges">
206
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
207
+ </div>
208
+
209
+ </body>
210
+ </html>
@@ -0,0 +1,151 @@
1
+ <?xml version="1.0" encoding="iso-8859-1"?>
2
+ <!DOCTYPE html
3
+ PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
4
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
5
+
6
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
7
+ <head>
8
+ <title>Module: Mack::Testing::DataMapperHelpers</title>
9
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
10
+ <meta http-equiv="Content-Script-Type" content="text/javascript" />
11
+ <link rel="stylesheet" href="../../.././rdoc-style.css" type="text/css" media="screen" />
12
+ <script type="text/javascript">
13
+ // <![CDATA[
14
+
15
+ function popupCode( url ) {
16
+ window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
17
+ }
18
+
19
+ function toggleCode( id ) {
20
+ if ( document.getElementById )
21
+ elem = document.getElementById( id );
22
+ else if ( document.all )
23
+ elem = eval( "document.all." + id );
24
+ else
25
+ return false;
26
+
27
+ elemStyle = elem.style;
28
+
29
+ if ( elemStyle.display != "block" ) {
30
+ elemStyle.display = "block"
31
+ } else {
32
+ elemStyle.display = "none"
33
+ }
34
+
35
+ return true;
36
+ }
37
+
38
+ // Make codeblocks hidden by default
39
+ document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
40
+
41
+ // ]]>
42
+ </script>
43
+
44
+ </head>
45
+ <body>
46
+
47
+
48
+
49
+ <div id="classHeader">
50
+ <table class="header-table">
51
+ <tr class="top-aligned-row">
52
+ <td><strong>Module</strong></td>
53
+ <td class="class-name-in-header">Mack::Testing::DataMapperHelpers</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/mack-data_mapper/test_extensions_rb.html">
59
+ lib/mack-data_mapper/test_extensions.rb
60
+ </a>
61
+ <br />
62
+ </td>
63
+ </tr>
64
+
65
+ </table>
66
+ </div>
67
+ <!-- banner header -->
68
+
69
+ <div id="bodyContent">
70
+
71
+
72
+
73
+ <div id="contextContent">
74
+
75
+
76
+
77
+ </div>
78
+
79
+ <div id="method-list">
80
+ <h3 class="section-bar">Methods</h3>
81
+
82
+ <div class="name-list">
83
+ <a href="#M000009">rollback_transaction</a>&nbsp;&nbsp;
84
+ </div>
85
+ </div>
86
+
87
+ </div>
88
+
89
+
90
+ <!-- if includes -->
91
+
92
+ <div id="section">
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+ <!-- if method_list -->
102
+ <div id="methods">
103
+ <h3 class="section-bar">Public Instance methods</h3>
104
+
105
+ <div id="method-M000009" class="method-detail">
106
+ <a name="M000009"></a>
107
+
108
+ <div class="method-heading">
109
+ <a href="#M000009" class="method-signature">
110
+ <span class="method-name">rollback_transaction</span><span class="method-args">() {|if block_given?| ...}</span>
111
+ </a>
112
+ </div>
113
+
114
+ <div class="method-description">
115
+ <p><a class="source-toggle" href="#"
116
+ onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
117
+ <div class="method-source-code" id="M000009-source">
118
+ <pre>
119
+ <span class="ruby-comment cmt"># File lib/mack-data_mapper/test_extensions.rb, line 30</span>
120
+ 30: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">rollback_transaction</span>
121
+ 31: <span class="ruby-keyword kw">begin</span>
122
+ 32: <span class="ruby-constant">Mack</span><span class="ruby-operator">::</span><span class="ruby-constant">Testing</span><span class="ruby-operator">::</span><span class="ruby-constant">DmTestTransactionWrapper</span>.<span class="ruby-identifier">transaction</span> <span class="ruby-keyword kw">do</span>
123
+ 33: <span class="ruby-comment cmt"># DataMapper::Transaction.new.commit do</span>
124
+ 34: <span class="ruby-keyword kw">yield</span> <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
125
+ 35: <span class="ruby-identifier">raise</span> <span class="ruby-value str">&quot;Rollback!&quot;</span>
126
+ 36: <span class="ruby-keyword kw">end</span>
127
+ 37: <span class="ruby-keyword kw">rescue</span> =<span class="ruby-operator">&gt;</span> <span class="ruby-identifier">ex</span>
128
+ 38: <span class="ruby-comment cmt"># we need to do this so we can throw up actual errors!</span>
129
+ 39: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">ex</span>.<span class="ruby-identifier">to_s</span> <span class="ruby-operator">==</span> <span class="ruby-value str">&quot;Rollback!&quot;</span>
130
+ 40: <span class="ruby-identifier">raise</span> <span class="ruby-identifier">ex</span>
131
+ 41: <span class="ruby-keyword kw">end</span>
132
+ 42: <span class="ruby-keyword kw">end</span>
133
+ 43: <span class="ruby-keyword kw">end</span>
134
+ </pre>
135
+ </div>
136
+ </div>
137
+ </div>
138
+
139
+
140
+ </div>
141
+
142
+
143
+ </div>
144
+
145
+
146
+ <div id="validator-badges">
147
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
148
+ </div>
149
+
150
+ </body>
151
+ </html>