ec2-host 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,359 @@
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
+ Module: EC2::Host::StringUtil
8
+
9
+ &mdash; Documentation by YARD 0.8.7.6
10
+
11
+ </title>
12
+
13
+ <link rel="stylesheet" href="../../css/style.css" type="text/css" charset="utf-8" />
14
+
15
+ <link rel="stylesheet" href="../../css/common.css" type="text/css" charset="utf-8" />
16
+
17
+ <script type="text/javascript" charset="utf-8">
18
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../../';
20
+ framesUrl = "../../frames.html#!EC2/Host/StringUtil.html";
21
+ </script>
22
+
23
+
24
+ <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
25
+
26
+ <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
27
+
28
+
29
+ </head>
30
+ <body>
31
+ <div id="header">
32
+ <div id="menu">
33
+
34
+ <a href="../../_index.html">Index (S)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../../EC2.html" title="EC2 (class)">EC2</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Host.html" title="EC2::Host (class)">Host</a></span></span>
36
+ &raquo;
37
+ <span class="title">StringUtil</span>
38
+
39
+
40
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
41
+ </div>
42
+
43
+ <div id="search">
44
+
45
+ <a class="full_list_link" id="class_list_link"
46
+ href="../../class_list.html">
47
+ Class List
48
+ </a>
49
+
50
+ <a class="full_list_link" id="method_list_link"
51
+ href="../../method_list.html">
52
+ Method List
53
+ </a>
54
+
55
+ <a class="full_list_link" id="file_list_link"
56
+ href="../../file_list.html">
57
+ File List
58
+ </a>
59
+
60
+ </div>
61
+ <div class="clear"></div>
62
+ </div>
63
+
64
+ <iframe id="search_frame"></iframe>
65
+
66
+ <div id="content"><h1>Module: EC2::Host::StringUtil
67
+
68
+
69
+
70
+ </h1>
71
+
72
+ <dl class="box">
73
+
74
+
75
+
76
+
77
+
78
+
79
+
80
+
81
+ <dt class="r1 last">Defined in:</dt>
82
+ <dd class="r1 last">lib/ec2/host/string_util.rb</dd>
83
+
84
+ </dl>
85
+ <div class="clear"></div>
86
+
87
+ <h2>Overview</h2><div class="docstring">
88
+ <div class="discussion">
89
+
90
+ <p>If want sophisticated utility, better to use ActiveSupport</p>
91
+
92
+
93
+ </div>
94
+ </div>
95
+ <div class="tags">
96
+
97
+
98
+ </div>
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+ <h2>
107
+ Class Method Summary
108
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
109
+ </h2>
110
+
111
+ <ul class="summary">
112
+
113
+ <li class="public ">
114
+ <span class="summary_signature">
115
+
116
+ <a href="#camelize-class_method" title="camelize (class method)">+ (Object) <strong>camelize</strong>(string) </a>
117
+
118
+
119
+
120
+ </span>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+ <span class="summary_desc"><div class='inline'></div></span>
131
+
132
+ </li>
133
+
134
+
135
+ <li class="public ">
136
+ <span class="summary_signature">
137
+
138
+ <a href="#pluralize-class_method" title="pluralize (class method)">+ (Object) <strong>pluralize</strong>(string) </a>
139
+
140
+
141
+
142
+ </span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'></div></span>
153
+
154
+ </li>
155
+
156
+
157
+ <li class="public ">
158
+ <span class="summary_signature">
159
+
160
+ <a href="#singularize-class_method" title="singularize (class method)">+ (Object) <strong>singularize</strong>(string) </a>
161
+
162
+
163
+
164
+ </span>
165
+
166
+
167
+
168
+
169
+
170
+
171
+
172
+
173
+
174
+ <span class="summary_desc"><div class='inline'></div></span>
175
+
176
+ </li>
177
+
178
+
179
+ <li class="public ">
180
+ <span class="summary_signature">
181
+
182
+ <a href="#underscore-class_method" title="underscore (class method)">+ (Object) <strong>underscore</strong>(camel_cased_word) </a>
183
+
184
+
185
+
186
+ </span>
187
+
188
+
189
+
190
+
191
+
192
+
193
+
194
+
195
+
196
+ <span class="summary_desc"><div class='inline'></div></span>
197
+
198
+ </li>
199
+
200
+
201
+ </ul>
202
+
203
+
204
+
205
+
206
+ <div id="class_method_details" class="method_details_list">
207
+ <h2>Class Method Details</h2>
208
+
209
+
210
+ <div class="method_details first">
211
+ <h3 class="signature first" id="camelize-class_method">
212
+
213
+ + (<tt>Object</tt>) <strong>camelize</strong>(string)
214
+
215
+
216
+
217
+
218
+
219
+ </h3><table class="source_code">
220
+ <tr>
221
+ <td>
222
+ <pre class="lines">
223
+
224
+
225
+ 5
226
+ 6
227
+ 7
228
+ 8
229
+ 9
230
+ 10</pre>
231
+ </td>
232
+ <td>
233
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/string_util.rb', line 5</span>
234
+
235
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_camelize'>camelize</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
236
+ <span class='id identifier rubyid_string'>string</span> <span class='op'>=</span> <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[a-z\d]*</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='backref'>$&amp;</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span> <span class='rbrace'>}</span>
237
+ <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>(?:_|(\/))([a-z\d]*)</span><span class='regexp_end'>/i</span></span><span class='rparen'>)</span> <span class='lbrace'>{</span> <span class='backref'>$2</span><span class='period'>.</span><span class='id identifier rubyid_capitalize'>capitalize</span> <span class='rbrace'>}</span>
238
+ <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>::</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
239
+ <span class='id identifier rubyid_string'>string</span>
240
+ <span class='kw'>end</span></pre>
241
+ </td>
242
+ </tr>
243
+ </table>
244
+ </div>
245
+
246
+ <div class="method_details ">
247
+ <h3 class="signature " id="pluralize-class_method">
248
+
249
+ + (<tt>Object</tt>) <strong>pluralize</strong>(string)
250
+
251
+
252
+
253
+
254
+
255
+ </h3><table class="source_code">
256
+ <tr>
257
+ <td>
258
+ <pre class="lines">
259
+
260
+
261
+ 22
262
+ 23
263
+ 24</pre>
264
+ </td>
265
+ <td>
266
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/string_util.rb', line 22</span>
267
+
268
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_pluralize'>pluralize</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
269
+ <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_content'>s</span><span class='tstring_end'>&quot;</span></span>
270
+ <span class='kw'>end</span></pre>
271
+ </td>
272
+ </tr>
273
+ </table>
274
+ </div>
275
+
276
+ <div class="method_details ">
277
+ <h3 class="signature " id="singularize-class_method">
278
+
279
+ + (<tt>Object</tt>) <strong>singularize</strong>(string)
280
+
281
+
282
+
283
+
284
+
285
+ </h3><table class="source_code">
286
+ <tr>
287
+ <td>
288
+ <pre class="lines">
289
+
290
+
291
+ 26
292
+ 27
293
+ 28</pre>
294
+ </td>
295
+ <td>
296
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/string_util.rb', line 26</span>
297
+
298
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_singularize'>singularize</span><span class='lparen'>(</span><span class='id identifier rubyid_string'>string</span><span class='rparen'>)</span>
299
+ <span class='id identifier rubyid_string'>string</span><span class='period'>.</span><span class='id identifier rubyid_chomp'>chomp</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>s</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
300
+ <span class='kw'>end</span></pre>
301
+ </td>
302
+ </tr>
303
+ </table>
304
+ </div>
305
+
306
+ <div class="method_details ">
307
+ <h3 class="signature " id="underscore-class_method">
308
+
309
+ + (<tt>Object</tt>) <strong>underscore</strong>(camel_cased_word)
310
+
311
+
312
+
313
+
314
+
315
+ </h3><table class="source_code">
316
+ <tr>
317
+ <td>
318
+ <pre class="lines">
319
+
320
+
321
+ 12
322
+ 13
323
+ 14
324
+ 15
325
+ 16
326
+ 17
327
+ 18
328
+ 19
329
+ 20</pre>
330
+ </td>
331
+ <td>
332
+ <pre class="code"><span class="info file"># File 'lib/ec2/host/string_util.rb', line 12</span>
333
+
334
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_underscore'>underscore</span><span class='lparen'>(</span><span class='id identifier rubyid_camel_cased_word'>camel_cased_word</span><span class='rparen'>)</span>
335
+ <span class='kw'>return</span> <span class='id identifier rubyid_camel_cased_word'>camel_cased_word</span> <span class='kw'>unless</span> <span class='id identifier rubyid_camel_cased_word'>camel_cased_word</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>[A-Z-]|::</span><span class='regexp_end'>/</span></span>
336
+ <span class='id identifier rubyid_word'>word</span> <span class='op'>=</span> <span class='id identifier rubyid_camel_cased_word'>camel_cased_word</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='period'>.</span><span class='id identifier rubyid_gsub'>gsub</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>::</span><span class='regexp_end'>/</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>/</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
337
+ <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>([A-Z\d]+)([A-Z][a-z])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\1_\2</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
338
+ <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_gsub!'>gsub!</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>([a-z\d])([A-Z])</span><span class='regexp_end'>/</span></span><span class='comma'>,</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>\1_\2</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
339
+ <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_tr!'>tr!</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>-</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>_</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
340
+ <span class='id identifier rubyid_word'>word</span><span class='period'>.</span><span class='id identifier rubyid_downcase!'>downcase!</span>
341
+ <span class='id identifier rubyid_word'>word</span>
342
+ <span class='kw'>end</span></pre>
343
+ </td>
344
+ </tr>
345
+ </table>
346
+ </div>
347
+
348
+ </div>
349
+
350
+ </div>
351
+
352
+ <div id="footer">
353
+ Generated on Thu Nov 24 10:25:36 2016 by
354
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
355
+ 0.8.7.6 (ruby-2.3.2).
356
+ </div>
357
+
358
+ </body>
359
+ </html>
@@ -0,0 +1,201 @@
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
+ Documentation by YARD 0.8.7.6
8
+
9
+ </title>
10
+
11
+ <link rel="stylesheet" href="css/style.css" type="text/css" charset="utf-8" />
12
+
13
+ <link rel="stylesheet" href="css/common.css" type="text/css" charset="utf-8" />
14
+
15
+ <script type="text/javascript" charset="utf-8">
16
+ hasFrames = window.top.frames.main ? true : false;
17
+ relpath = '';
18
+ framesUrl = "frames.html#!_index.html";
19
+ </script>
20
+
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
+ <div id="header">
30
+ <div id="menu">
31
+
32
+
33
+ <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
34
+ </div>
35
+
36
+ <div id="search">
37
+
38
+ <a class="full_list_link" id="class_list_link"
39
+ href="class_list.html">
40
+ Class List
41
+ </a>
42
+
43
+ <a class="full_list_link" id="method_list_link"
44
+ href="method_list.html">
45
+ Method List
46
+ </a>
47
+
48
+ <a class="full_list_link" id="file_list_link"
49
+ href="file_list.html">
50
+ File List
51
+ </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="noborder title">Documentation by YARD 0.8.7.6</h1>
60
+ <div id="listing">
61
+ <h1 class="alphaindex">Alphabetic Index</h1>
62
+
63
+ <h2>File Listing</h2>
64
+ <ul id="files" class="index_inline_list">
65
+
66
+
67
+ <li class="r1"><a href="index.html" title="README">README</a></li>
68
+
69
+
70
+ <li class="r2"><a href="file.LICENSE.html" title="LICENSE">LICENSE</a></li>
71
+
72
+
73
+ </ul>
74
+
75
+ <div class="clear"></div>
76
+ <h2>Namespace Listing A-Z</h2>
77
+
78
+
79
+
80
+
81
+ <table>
82
+ <tr>
83
+ <td valign='top' width="33%">
84
+
85
+
86
+ <ul id="alpha_C" class="alpha">
87
+ <li class="letter">C</li>
88
+ <ul>
89
+
90
+ <li>
91
+ <span class='object_link'><a href="EC2/Host/CLI.html" title="EC2::Host::CLI (class)">CLI</a></span>
92
+
93
+ <small>(EC2::Host)</small>
94
+
95
+ </li>
96
+
97
+ <li>
98
+ <span class='object_link'><a href="EC2/Host/Config.html" title="EC2::Host::Config (class)">Config</a></span>
99
+
100
+ <small>(EC2::Host)</small>
101
+
102
+ </li>
103
+
104
+ </ul>
105
+ </ul>
106
+
107
+
108
+ <ul id="alpha_E" class="alpha">
109
+ <li class="letter">E</li>
110
+ <ul>
111
+
112
+ <li>
113
+ <span class='object_link'><a href="EC2.html" title="EC2 (class)">EC2</a></span>
114
+
115
+ </li>
116
+
117
+ <li>
118
+ <span class='object_link'><a href="EC2/Host/EC2Client.html" title="EC2::Host::EC2Client (class)">EC2Client</a></span>
119
+
120
+ <small>(EC2::Host)</small>
121
+
122
+ </li>
123
+
124
+ </ul>
125
+ </ul>
126
+
127
+
128
+ <ul id="alpha_H" class="alpha">
129
+ <li class="letter">H</li>
130
+ <ul>
131
+
132
+ <li>
133
+ <span class='object_link'><a href="EC2/Host/HashUtil.html" title="EC2::Host::HashUtil (module)">HashUtil</a></span>
134
+
135
+ <small>(EC2::Host)</small>
136
+
137
+ </li>
138
+
139
+ <li>
140
+ <span class='object_link'><a href="EC2/Host.html" title="EC2::Host (class)">Host</a></span>
141
+
142
+ <small>(EC2)</small>
143
+
144
+ </li>
145
+
146
+ <li>
147
+ <span class='object_link'><a href="EC2/Host/HostData.html" title="EC2::Host::HostData (class)">HostData</a></span>
148
+
149
+ <small>(EC2::Host)</small>
150
+
151
+ </li>
152
+
153
+ </ul>
154
+ </ul>
155
+
156
+
157
+ <ul id="alpha_R" class="alpha">
158
+ <li class="letter">R</li>
159
+ <ul>
160
+
161
+ <li>
162
+ <span class='object_link'><a href="EC2/Host/RoleData.html" title="EC2::Host::RoleData (class)">RoleData</a></span>
163
+
164
+ <small>(EC2::Host)</small>
165
+
166
+ </li>
167
+
168
+ </ul>
169
+ </ul>
170
+
171
+
172
+ <ul id="alpha_S" class="alpha">
173
+ <li class="letter">S</li>
174
+ <ul>
175
+
176
+ <li>
177
+ <span class='object_link'><a href="EC2/Host/StringUtil.html" title="EC2::Host::StringUtil (module)">StringUtil</a></span>
178
+
179
+ <small>(EC2::Host)</small>
180
+
181
+ </li>
182
+
183
+ </ul>
184
+ </ul>
185
+
186
+ </td>
187
+ </tr>
188
+ </table>
189
+
190
+ </div>
191
+
192
+ </div>
193
+
194
+ <div id="footer">
195
+ Generated on Thu Nov 24 10:25:35 2016 by
196
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
197
+ 0.8.7.6 (ruby-2.3.2).
198
+ </div>
199
+
200
+ </body>
201
+ </html>