mattock 0.2.2 → 0.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/doc/FileSandbox.html +537 -0
- data/doc/FileSandbox/HaveContents.html +279 -0
- data/doc/FileSandbox/Sandbox.html +525 -0
- data/doc/FileSandbox/SandboxFile.html +622 -0
- data/doc/Mattock.html +137 -0
- data/doc/Mattock/CascadingDefinition.html +459 -0
- data/doc/Mattock/CommandChain.html +456 -0
- data/doc/Mattock/CommandLine.html +1312 -0
- data/doc/Mattock/CommandLineExampleGroup.html +282 -0
- data/doc/Mattock/CommandLineExampleGroup/Matchers.html +109 -0
- data/doc/Mattock/CommandRunResult.html +643 -0
- data/doc/Mattock/CommandTask.html +464 -0
- data/doc/Mattock/Configurable.html +609 -0
- data/doc/Mattock/Configurable/ClassMethods.html +754 -0
- data/doc/Mattock/Configurable/Struct.html +148 -0
- data/doc/Mattock/FileCreationTask.html +177 -0
- data/doc/Mattock/FileTask.html +177 -0
- data/doc/Mattock/MockCommandResult.html +445 -0
- data/doc/Mattock/MultiTask.html +177 -0
- data/doc/Mattock/PipelineChain.html +221 -0
- data/doc/Mattock/PrereqChain.html +221 -0
- data/doc/Mattock/RakeExampleGroup.html +292 -0
- data/doc/Mattock/RakeExampleGroup/Matchers.html +109 -0
- data/doc/Mattock/RakeExampleGroup/TaskManager.html +131 -0
- data/doc/Mattock/RemoteCommandTask.html +423 -0
- data/doc/Mattock/ShellEscaped.html +315 -0
- data/doc/Mattock/Task.html +181 -0
- data/doc/Mattock/TaskLib.html +755 -0
- data/doc/Mattock/TaskMixin.html +668 -0
- data/doc/Mattock/TaskMixin/ClassMethods.html +166 -0
- data/doc/Mattock/TemplateHost.html +320 -0
- data/doc/Mattock/ValiseManager.html +257 -0
- data/doc/Mattock/WrappingChain.html +221 -0
- data/doc/Mattock/YARDExtensions.html +110 -0
- data/doc/Mattock/YARDExtensions/DefineHandler.html +253 -0
- data/doc/Mattock/YARDExtensions/NilFieldsHandler.html +258 -0
- data/doc/Mattock/YARDExtensions/RequiredFieldsHandler.html +205 -0
- data/doc/Mattock/YARDExtensions/SettingHandler.html +529 -0
- data/doc/Mattock/YARDExtensions/SettingsHandler.html +207 -0
- data/doc/RSpecTest.html +233 -0
- data/doc/Ungemmer.html +282 -0
- data/doc/_index.html +435 -0
- data/doc/class_list.html +47 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +55 -0
- data/doc/css/style.css +322 -0
- data/doc/file.README.html +107 -0
- data/doc/file_list.html +49 -0
- data/doc/frames.html +13 -0
- data/doc/index.html +107 -0
- data/doc/js/app.js +205 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +16 -0
- data/doc/method_list.html +950 -0
- data/doc/top-level-namespace.html +107 -0
- data/lib/mattock/task.rb +12 -0
- data/lib/mattock/yard_extensions.rb +36 -0
- data/yard_templates/default/module/setup.rb +1 -0
- metadata +114 -4
|
@@ -0,0 +1,279 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: FileSandbox::HaveContents
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.7.5
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
relpath = '..';
|
|
19
|
+
if (relpath != '') relpath += '/';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div id="header">
|
|
34
|
+
<div id="menu">
|
|
35
|
+
|
|
36
|
+
<a href="../_index.html">Index (H)</a> »
|
|
37
|
+
<span class='title'><span class='object_link'><a href="../FileSandbox.html" title="FileSandbox (module)">FileSandbox</a></span></span>
|
|
38
|
+
»
|
|
39
|
+
<span class="title">HaveContents</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div id="search">
|
|
46
|
+
|
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
|
48
|
+
|
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
|
50
|
+
|
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<div class="clear"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<iframe id="search_frame"></iframe>
|
|
58
|
+
|
|
59
|
+
<div id="content"><h1>Class: FileSandbox::HaveContents
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<dl class="box">
|
|
66
|
+
|
|
67
|
+
<dt class="r1">Inherits:</dt>
|
|
68
|
+
<dd class="r1">
|
|
69
|
+
<span class="inheritName">Object</span>
|
|
70
|
+
|
|
71
|
+
<ul class="fullTree">
|
|
72
|
+
<li>Object</li>
|
|
73
|
+
|
|
74
|
+
<li class="next">FileSandbox::HaveContents</li>
|
|
75
|
+
|
|
76
|
+
</ul>
|
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
78
|
+
|
|
79
|
+
</dd>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
|
90
|
+
<dd class="r2 last">spec_help/file-sandbox.rb</dd>
|
|
91
|
+
|
|
92
|
+
</dl>
|
|
93
|
+
<div class="clear"></div>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
<h2>
|
|
104
|
+
Instance Method Summary
|
|
105
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
106
|
+
</h2>
|
|
107
|
+
|
|
108
|
+
<ul class="summary">
|
|
109
|
+
|
|
110
|
+
<li class="public ">
|
|
111
|
+
<span class="summary_signature">
|
|
112
|
+
|
|
113
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (HaveContents) <strong>initialize</strong>(contents) </a>
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
</span>
|
|
118
|
+
|
|
119
|
+
<span class="note title constructor">constructor</span>
|
|
120
|
+
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
<span class="summary_desc"><div class='inline'>
|
|
129
|
+
<p>A new instance of HaveContents.</p>
|
|
130
|
+
</div></span>
|
|
131
|
+
|
|
132
|
+
</li>
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
<li class="public ">
|
|
136
|
+
<span class="summary_signature">
|
|
137
|
+
|
|
138
|
+
<a href="#matches%3F-instance_method" title="#matches? (instance method)">- (Boolean) <strong>matches?</strong>(target) </a>
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
</span>
|
|
143
|
+
|
|
144
|
+
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
152
|
+
|
|
153
|
+
</li>
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
</ul>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<div id="constructor_details" class="method_details_list">
|
|
160
|
+
<h2>Constructor Details</h2>
|
|
161
|
+
|
|
162
|
+
<div class="method_details first">
|
|
163
|
+
<p class="signature first" id="initialize-instance_method">
|
|
164
|
+
|
|
165
|
+
- (<tt><span class='object_link'><a href="" title="FileSandbox::HaveContents (class)">HaveContents</a></span></tt>) <strong>initialize</strong>(contents)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</p><div class="docstring">
|
|
170
|
+
<div class="discussion">
|
|
171
|
+
|
|
172
|
+
<p>A new instance of HaveContents</p>
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
</div>
|
|
176
|
+
</div>
|
|
177
|
+
<div class="tags">
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
</div><table class="source_code">
|
|
181
|
+
<tr>
|
|
182
|
+
<td>
|
|
183
|
+
<pre class="lines">
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
18
|
|
187
|
+
19
|
|
188
|
+
20</pre>
|
|
189
|
+
</td>
|
|
190
|
+
<td>
|
|
191
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 18</span>
|
|
192
|
+
|
|
193
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_contents'>contents</span><span class='rparen'>)</span>
|
|
194
|
+
<span class='ivar'>@contents</span> <span class='op'>=</span> <span class='id identifier rubyid_contents'>contents</span>
|
|
195
|
+
<span class='kw'>end</span></pre>
|
|
196
|
+
</td>
|
|
197
|
+
</tr>
|
|
198
|
+
</table>
|
|
199
|
+
</div>
|
|
200
|
+
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
|
|
204
|
+
<div id="instance_method_details" class="method_details_list">
|
|
205
|
+
<h2>Instance Method Details</h2>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<div class="method_details first">
|
|
209
|
+
<p class="signature first" id="matches?-instance_method">
|
|
210
|
+
|
|
211
|
+
- (<tt>Boolean</tt>) <strong>matches?</strong>(target)
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</p><div class="docstring">
|
|
216
|
+
<div class="discussion">
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
</div>
|
|
220
|
+
</div>
|
|
221
|
+
<div class="tags">
|
|
222
|
+
|
|
223
|
+
<h3>Returns:</h3>
|
|
224
|
+
<ul class="return">
|
|
225
|
+
|
|
226
|
+
<li>
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
|
|
233
|
+
</li>
|
|
234
|
+
|
|
235
|
+
</ul>
|
|
236
|
+
|
|
237
|
+
</div><table class="source_code">
|
|
238
|
+
<tr>
|
|
239
|
+
<td>
|
|
240
|
+
<pre class="lines">
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
22
|
|
244
|
+
23
|
|
245
|
+
24
|
|
246
|
+
25
|
|
247
|
+
26
|
|
248
|
+
27
|
|
249
|
+
28
|
|
250
|
+
29</pre>
|
|
251
|
+
</td>
|
|
252
|
+
<td>
|
|
253
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 22</span>
|
|
254
|
+
|
|
255
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_matches?'>matches?</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span>
|
|
256
|
+
<span class='kw'>case</span> <span class='ivar'>@contents</span>
|
|
257
|
+
<span class='kw'>when</span> <span class='const'>Regexp</span>
|
|
258
|
+
<span class='ivar'>@contents</span> <span class='op'>=~</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span>
|
|
259
|
+
<span class='kw'>when</span> <span class='const'>String</span>
|
|
260
|
+
<span class='ivar'>@contents</span> <span class='op'>==</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_contents'>contents</span>
|
|
261
|
+
<span class='kw'>end</span>
|
|
262
|
+
<span class='kw'>end</span></pre>
|
|
263
|
+
</td>
|
|
264
|
+
</tr>
|
|
265
|
+
</table>
|
|
266
|
+
</div>
|
|
267
|
+
|
|
268
|
+
</div>
|
|
269
|
+
|
|
270
|
+
</div>
|
|
271
|
+
|
|
272
|
+
<div id="footer">
|
|
273
|
+
Generated on Mon Mar 5 23:15:39 2012 by
|
|
274
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
275
|
+
0.7.5 (ruby-1.9.2).
|
|
276
|
+
</div>
|
|
277
|
+
|
|
278
|
+
</body>
|
|
279
|
+
</html>
|
|
@@ -0,0 +1,525 @@
|
|
|
1
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
|
2
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
3
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
4
|
+
<head>
|
|
5
|
+
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
6
|
+
<title>
|
|
7
|
+
Class: FileSandbox::Sandbox
|
|
8
|
+
|
|
9
|
+
— Documentation by YARD 0.7.5
|
|
10
|
+
|
|
11
|
+
</title>
|
|
12
|
+
|
|
13
|
+
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
|
|
14
|
+
|
|
15
|
+
<link rel="stylesheet" href="../css/common.css" type="text/css" media="screen" charset="utf-8" />
|
|
16
|
+
|
|
17
|
+
<script type="text/javascript" charset="utf-8">
|
|
18
|
+
relpath = '..';
|
|
19
|
+
if (relpath != '') relpath += '/';
|
|
20
|
+
</script>
|
|
21
|
+
|
|
22
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
23
|
+
|
|
24
|
+
<script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
</head>
|
|
28
|
+
<body>
|
|
29
|
+
<script type="text/javascript" charset="utf-8">
|
|
30
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<div id="header">
|
|
34
|
+
<div id="menu">
|
|
35
|
+
|
|
36
|
+
<a href="../_index.html">Index (S)</a> »
|
|
37
|
+
<span class='title'><span class='object_link'><a href="../FileSandbox.html" title="FileSandbox (module)">FileSandbox</a></span></span>
|
|
38
|
+
»
|
|
39
|
+
<span class="title">Sandbox</span>
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
|
43
|
+
</div>
|
|
44
|
+
|
|
45
|
+
<div id="search">
|
|
46
|
+
|
|
47
|
+
<a id="class_list_link" href="#">Class List</a>
|
|
48
|
+
|
|
49
|
+
<a id="method_list_link" href="#">Method List</a>
|
|
50
|
+
|
|
51
|
+
<a id="file_list_link" href="#">File List</a>
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
<div class="clear"></div>
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<iframe id="search_frame"></iframe>
|
|
58
|
+
|
|
59
|
+
<div id="content"><h1>Class: FileSandbox::Sandbox
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
</h1>
|
|
64
|
+
|
|
65
|
+
<dl class="box">
|
|
66
|
+
|
|
67
|
+
<dt class="r1">Inherits:</dt>
|
|
68
|
+
<dd class="r1">
|
|
69
|
+
<span class="inheritName">Object</span>
|
|
70
|
+
|
|
71
|
+
<ul class="fullTree">
|
|
72
|
+
<li>Object</li>
|
|
73
|
+
|
|
74
|
+
<li class="next">FileSandbox::Sandbox</li>
|
|
75
|
+
|
|
76
|
+
</ul>
|
|
77
|
+
<a href="#" class="inheritanceTree">show all</a>
|
|
78
|
+
|
|
79
|
+
</dd>
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
<dt class="r2 last">Defined in:</dt>
|
|
90
|
+
<dd class="r2 last">spec_help/file-sandbox.rb</dd>
|
|
91
|
+
|
|
92
|
+
</dl>
|
|
93
|
+
<div class="clear"></div>
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
|
100
|
+
<ul class="summary">
|
|
101
|
+
|
|
102
|
+
<li class="public ">
|
|
103
|
+
<span class="summary_signature">
|
|
104
|
+
|
|
105
|
+
<a href="#root-instance_method" title="#root (instance method)">- (Object) <strong>root</strong> </a>
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
|
|
109
|
+
</span>
|
|
110
|
+
|
|
111
|
+
|
|
112
|
+
<span class="note title readonly">readonly</span>
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
<span class="summary_desc"><div class='inline'>
|
|
122
|
+
<p>Returns the value of attribute root.</p>
|
|
123
|
+
</div></span>
|
|
124
|
+
|
|
125
|
+
</li>
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
</ul>
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
<h2>
|
|
135
|
+
Instance Method Summary
|
|
136
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
|
137
|
+
</h2>
|
|
138
|
+
|
|
139
|
+
<ul class="summary">
|
|
140
|
+
|
|
141
|
+
<li class="public ">
|
|
142
|
+
<span class="summary_signature">
|
|
143
|
+
|
|
144
|
+
<a href="#%5B%5D-instance_method" title="#[] (instance method)">- (Object) <strong>[]</strong>(name) </a>
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
|
|
148
|
+
</span>
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
|
|
155
|
+
|
|
156
|
+
|
|
157
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
158
|
+
|
|
159
|
+
</li>
|
|
160
|
+
|
|
161
|
+
|
|
162
|
+
<li class="public ">
|
|
163
|
+
<span class="summary_signature">
|
|
164
|
+
|
|
165
|
+
<a href="#clean_up-instance_method" title="#clean_up (instance method)">- (Object) <strong>clean_up</strong> </a>
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
|
|
169
|
+
</span>
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
179
|
+
|
|
180
|
+
</li>
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
<li class="public ">
|
|
184
|
+
<span class="summary_signature">
|
|
185
|
+
|
|
186
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Sandbox) <strong>initialize</strong>(path = '__sandbox') </a>
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
</span>
|
|
191
|
+
|
|
192
|
+
<span class="note title constructor">constructor</span>
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
|
|
201
|
+
<span class="summary_desc"><div class='inline'>
|
|
202
|
+
<p>A new instance of Sandbox.</p>
|
|
203
|
+
</div></span>
|
|
204
|
+
|
|
205
|
+
</li>
|
|
206
|
+
|
|
207
|
+
|
|
208
|
+
<li class="public ">
|
|
209
|
+
<span class="summary_signature">
|
|
210
|
+
|
|
211
|
+
<a href="#new-instance_method" title="#new (instance method)">- (Object) <strong>new</strong>(options) </a>
|
|
212
|
+
|
|
213
|
+
|
|
214
|
+
|
|
215
|
+
</span>
|
|
216
|
+
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
<span class="summary_desc"><div class='inline'>
|
|
225
|
+
<p>usage new :file=>'my file.rb', :with_contents=>'some stuff'.</p>
|
|
226
|
+
</div></span>
|
|
227
|
+
|
|
228
|
+
</li>
|
|
229
|
+
|
|
230
|
+
|
|
231
|
+
<li class="public ">
|
|
232
|
+
<span class="summary_signature">
|
|
233
|
+
|
|
234
|
+
<a href="#remove-instance_method" title="#remove (instance method)">- (Object) <strong>remove</strong>(options) </a>
|
|
235
|
+
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
</span>
|
|
239
|
+
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
|
248
|
+
|
|
249
|
+
</li>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
</ul>
|
|
253
|
+
|
|
254
|
+
|
|
255
|
+
<div id="constructor_details" class="method_details_list">
|
|
256
|
+
<h2>Constructor Details</h2>
|
|
257
|
+
|
|
258
|
+
<div class="method_details first">
|
|
259
|
+
<p class="signature first" id="initialize-instance_method">
|
|
260
|
+
|
|
261
|
+
- (<tt><span class='object_link'><a href="" title="FileSandbox::Sandbox (class)">Sandbox</a></span></tt>) <strong>initialize</strong>(path = '__sandbox')
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
|
|
265
|
+
</p><div class="docstring">
|
|
266
|
+
<div class="discussion">
|
|
267
|
+
|
|
268
|
+
<p>A new instance of Sandbox</p>
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
<div class="tags">
|
|
274
|
+
|
|
275
|
+
|
|
276
|
+
</div><table class="source_code">
|
|
277
|
+
<tr>
|
|
278
|
+
<td>
|
|
279
|
+
<pre class="lines">
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
82
|
|
283
|
+
83
|
|
284
|
+
84
|
|
285
|
+
85
|
|
286
|
+
86</pre>
|
|
287
|
+
</td>
|
|
288
|
+
<td>
|
|
289
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 82</span>
|
|
290
|
+
|
|
291
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span> <span class='op'>=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>__sandbox</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
292
|
+
<span class='ivar'>@root</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_expand_path'>expand_path</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
|
293
|
+
<span class='id identifier rubyid_clean_up'>clean_up</span>
|
|
294
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span> <span class='ivar'>@root</span>
|
|
295
|
+
<span class='kw'>end</span></pre>
|
|
296
|
+
</td>
|
|
297
|
+
</tr>
|
|
298
|
+
</table>
|
|
299
|
+
</div>
|
|
300
|
+
|
|
301
|
+
</div>
|
|
302
|
+
|
|
303
|
+
<div id="instance_attr_details" class="attr_details">
|
|
304
|
+
<h2>Instance Attribute Details</h2>
|
|
305
|
+
|
|
306
|
+
|
|
307
|
+
<span id=""></span>
|
|
308
|
+
<span id="root-instance_method"></span>
|
|
309
|
+
<div class="method_details first">
|
|
310
|
+
<p class="signature first" id="root-instance_method">
|
|
311
|
+
|
|
312
|
+
- (<tt>Object</tt>) <strong>root</strong> <span class="extras">(readonly)</span>
|
|
313
|
+
|
|
314
|
+
|
|
315
|
+
|
|
316
|
+
</p><div class="docstring">
|
|
317
|
+
<div class="discussion">
|
|
318
|
+
|
|
319
|
+
<p>Returns the value of attribute root</p>
|
|
320
|
+
|
|
321
|
+
|
|
322
|
+
</div>
|
|
323
|
+
</div>
|
|
324
|
+
<div class="tags">
|
|
325
|
+
|
|
326
|
+
|
|
327
|
+
</div><table class="source_code">
|
|
328
|
+
<tr>
|
|
329
|
+
<td>
|
|
330
|
+
<pre class="lines">
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
80
|
|
334
|
+
81
|
|
335
|
+
82</pre>
|
|
336
|
+
</td>
|
|
337
|
+
<td>
|
|
338
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 80</span>
|
|
339
|
+
|
|
340
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_root'>root</span>
|
|
341
|
+
<span class='ivar'>@root</span>
|
|
342
|
+
<span class='kw'>end</span></pre>
|
|
343
|
+
</td>
|
|
344
|
+
</tr>
|
|
345
|
+
</table>
|
|
346
|
+
</div>
|
|
347
|
+
|
|
348
|
+
</div>
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<div id="instance_method_details" class="method_details_list">
|
|
352
|
+
<h2>Instance Method Details</h2>
|
|
353
|
+
|
|
354
|
+
|
|
355
|
+
<div class="method_details first">
|
|
356
|
+
<p class="signature first" id="[]-instance_method">
|
|
357
|
+
|
|
358
|
+
- (<tt>Object</tt>) <strong>[]</strong>(name)
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
</p><table class="source_code">
|
|
363
|
+
<tr>
|
|
364
|
+
<td>
|
|
365
|
+
<pre class="lines">
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
88
|
|
369
|
+
89
|
|
370
|
+
90</pre>
|
|
371
|
+
</td>
|
|
372
|
+
<td>
|
|
373
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 88</span>
|
|
374
|
+
|
|
375
|
+
<span class='kw'>def</span> <span class='op'>[]</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
376
|
+
<span class='const'>SandboxFile</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='ivar'>@root</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span><span class='comma'>,</span> <span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
|
|
377
|
+
<span class='kw'>end</span></pre>
|
|
378
|
+
</td>
|
|
379
|
+
</tr>
|
|
380
|
+
</table>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<div class="method_details ">
|
|
384
|
+
<p class="signature " id="clean_up-instance_method">
|
|
385
|
+
|
|
386
|
+
- (<tt>Object</tt>) <strong>clean_up</strong>
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
|
|
390
|
+
</p><table class="source_code">
|
|
391
|
+
<tr>
|
|
392
|
+
<td>
|
|
393
|
+
<pre class="lines">
|
|
394
|
+
|
|
395
|
+
|
|
396
|
+
116
|
|
397
|
+
117
|
|
398
|
+
118
|
|
399
|
+
119
|
|
400
|
+
120
|
|
401
|
+
121</pre>
|
|
402
|
+
</td>
|
|
403
|
+
<td>
|
|
404
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 116</span>
|
|
405
|
+
|
|
406
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_clean_up'>clean_up</span>
|
|
407
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm_rf'>rm_rf</span> <span class='ivar'>@root</span>
|
|
408
|
+
<span class='kw'>if</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_exists?'>exists?</span> <span class='ivar'>@root</span>
|
|
409
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Could not remove directory </span><span class='embexpr_beg'>#{</span><span class='ivar'>@root</span><span class='period'>.</span><span class='id identifier rubyid_inspect'>inspect</span><span class='rbrace'>}</span><span class='tstring_content'>, something is probably still holding a lock on it</span><span class='tstring_end'>"</span></span>
|
|
410
|
+
<span class='kw'>end</span>
|
|
411
|
+
<span class='kw'>end</span></pre>
|
|
412
|
+
</td>
|
|
413
|
+
</tr>
|
|
414
|
+
</table>
|
|
415
|
+
</div>
|
|
416
|
+
|
|
417
|
+
<div class="method_details ">
|
|
418
|
+
<p class="signature " id="new-instance_method">
|
|
419
|
+
|
|
420
|
+
- (<tt>Object</tt>) <strong>new</strong>(options)
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
424
|
+
</p><div class="docstring">
|
|
425
|
+
<div class="discussion">
|
|
426
|
+
|
|
427
|
+
<p>usage new :file=>'my file.rb', :with_contents=>'some stuff'</p>
|
|
428
|
+
|
|
429
|
+
|
|
430
|
+
</div>
|
|
431
|
+
</div>
|
|
432
|
+
<div class="tags">
|
|
433
|
+
|
|
434
|
+
|
|
435
|
+
</div><table class="source_code">
|
|
436
|
+
<tr>
|
|
437
|
+
<td>
|
|
438
|
+
<pre class="lines">
|
|
439
|
+
|
|
440
|
+
|
|
441
|
+
93
|
|
442
|
+
94
|
|
443
|
+
95
|
|
444
|
+
96
|
|
445
|
+
97
|
|
446
|
+
98
|
|
447
|
+
99
|
|
448
|
+
100
|
|
449
|
+
101
|
|
450
|
+
102
|
|
451
|
+
103
|
|
452
|
+
104
|
|
453
|
+
105
|
|
454
|
+
106
|
|
455
|
+
107
|
|
456
|
+
108
|
|
457
|
+
109</pre>
|
|
458
|
+
</td>
|
|
459
|
+
<td>
|
|
460
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 93</span>
|
|
461
|
+
|
|
462
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
463
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span> <span class='symbol'>:directory</span>
|
|
464
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:directory</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
|
465
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_mkdir_p'>mkdir_p</span> <span class='id identifier rubyid_dir'>dir</span><span class='period'>.</span><span class='id identifier rubyid_path'>path</span>
|
|
466
|
+
<span class='kw'>else</span>
|
|
467
|
+
<span class='id identifier rubyid_file'>file</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:file</span><span class='rparen'>)</span><span class='rbracket'>]</span>
|
|
468
|
+
<span class='kw'>if</span> <span class='lparen'>(</span><span class='id identifier rubyid_binary_content'>binary_content</span> <span class='op'>=</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:with_binary_content</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:with_binary_contents</span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
469
|
+
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_binary_content'>binary_content</span> <span class='op'>=</span> <span class='id identifier rubyid_binary_content'>binary_content</span>
|
|
470
|
+
<span class='kw'>else</span>
|
|
471
|
+
<span class='id identifier rubyid_file'>file</span><span class='period'>.</span><span class='id identifier rubyid_content'>content</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:with_content</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='symbol'>:with_contents</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
|
472
|
+
<span class='kw'>end</span>
|
|
473
|
+
<span class='kw'>end</span>
|
|
474
|
+
|
|
475
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>unexpected keys '</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>, </span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rbrace'>}</span><span class='tstring_content'>'</span><span class='tstring_end'>"</span></span> <span class='kw'>unless</span> <span class='id identifier rubyid_options'>options</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
|
476
|
+
|
|
477
|
+
<span class='id identifier rubyid_dir'>dir</span> <span class='op'>||</span> <span class='id identifier rubyid_file'>file</span>
|
|
478
|
+
<span class='kw'>end</span></pre>
|
|
479
|
+
</td>
|
|
480
|
+
</tr>
|
|
481
|
+
</table>
|
|
482
|
+
</div>
|
|
483
|
+
|
|
484
|
+
<div class="method_details ">
|
|
485
|
+
<p class="signature " id="remove-instance_method">
|
|
486
|
+
|
|
487
|
+
- (<tt>Object</tt>) <strong>remove</strong>(options)
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
</p><table class="source_code">
|
|
492
|
+
<tr>
|
|
493
|
+
<td>
|
|
494
|
+
<pre class="lines">
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
111
|
|
498
|
+
112
|
|
499
|
+
113
|
|
500
|
+
114</pre>
|
|
501
|
+
</td>
|
|
502
|
+
<td>
|
|
503
|
+
<pre class="code"><span class="info file"># File 'spec_help/file-sandbox.rb', line 111</span>
|
|
504
|
+
|
|
505
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_remove'>remove</span><span class='lparen'>(</span><span class='id identifier rubyid_options'>options</span><span class='rparen'>)</span>
|
|
506
|
+
<span class='id identifier rubyid_name'>name</span> <span class='op'>=</span> <span class='const'>File</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='ivar'>@root</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span><span class='lbracket'>[</span><span class='symbol'>:file</span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
|
507
|
+
<span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_remove_file'>remove_file</span> <span class='id identifier rubyid_name'>name</span>
|
|
508
|
+
<span class='kw'>end</span></pre>
|
|
509
|
+
</td>
|
|
510
|
+
</tr>
|
|
511
|
+
</table>
|
|
512
|
+
</div>
|
|
513
|
+
|
|
514
|
+
</div>
|
|
515
|
+
|
|
516
|
+
</div>
|
|
517
|
+
|
|
518
|
+
<div id="footer">
|
|
519
|
+
Generated on Mon Mar 5 23:15:39 2012 by
|
|
520
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
521
|
+
0.7.5 (ruby-1.9.2).
|
|
522
|
+
</div>
|
|
523
|
+
|
|
524
|
+
</body>
|
|
525
|
+
</html>
|