cowtech-extensions 2.1.3 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.gitignore +1 -0
  2. data/.yardopts +1 -0
  3. data/README.md +10 -0
  4. data/Rakefile +6 -3
  5. data/cowtech-extensions.gemspec +9 -5
  6. data/doc/Cowtech.html +128 -0
  7. data/doc/Cowtech/Extensions.html +546 -0
  8. data/doc/Cowtech/Extensions/Boolean.html +297 -0
  9. data/doc/Cowtech/Extensions/DateTime.html +787 -0
  10. data/doc/Cowtech/Extensions/DateTime/ClassMethods.html +1592 -0
  11. data/doc/Cowtech/Extensions/Exceptions.html +125 -0
  12. data/doc/Cowtech/Extensions/Exceptions/Dump.html +133 -0
  13. data/doc/Cowtech/Extensions/Hash.html +393 -0
  14. data/doc/Cowtech/Extensions/Math.html +130 -0
  15. data/doc/Cowtech/Extensions/Math/ClassMethods.html +362 -0
  16. data/doc/Cowtech/Extensions/Object.html +1565 -0
  17. data/doc/Cowtech/Extensions/Pathname.html +225 -0
  18. data/doc/Cowtech/Extensions/Settings.html +1249 -0
  19. data/doc/Cowtech/Extensions/String.html +471 -0
  20. data/doc/Cowtech/Extensions/TimeZone.html +1210 -0
  21. data/doc/Cowtech/Extensions/TimeZone/ClassMethods.html +925 -0
  22. data/doc/Cowtech/Extensions/Version.html +189 -0
  23. data/doc/_index.html +305 -0
  24. data/doc/class_list.html +53 -0
  25. data/doc/css/common.css +1 -0
  26. data/doc/css/full_list.css +57 -0
  27. data/doc/css/style.css +328 -0
  28. data/doc/file.README.html +103 -0
  29. data/doc/file_list.html +55 -0
  30. data/doc/frames.html +28 -0
  31. data/doc/index.html +103 -0
  32. data/doc/js/app.js +214 -0
  33. data/doc/js/full_list.js +173 -0
  34. data/doc/js/jquery.js +4 -0
  35. data/doc/method_list.html +620 -0
  36. data/doc/top-level-namespace.html +112 -0
  37. data/lib/cowtech-extensions.rb +47 -16
  38. data/lib/cowtech-extensions/boolean.rb +8 -1
  39. data/lib/cowtech-extensions/datetime.rb +377 -71
  40. data/lib/cowtech-extensions/exceptions.rb +16 -0
  41. data/lib/cowtech-extensions/hash.rb +20 -9
  42. data/lib/cowtech-extensions/math.rb +15 -8
  43. data/lib/cowtech-extensions/object.rb +84 -27
  44. data/lib/cowtech-extensions/pathname.rb +10 -1
  45. data/lib/cowtech-extensions/settings.rb +120 -0
  46. data/lib/cowtech-extensions/string.rb +30 -3
  47. data/lib/cowtech-extensions/version.rb +11 -2
  48. data/spec/coverage_helper.rb +19 -0
  49. data/spec/cowtech-extensions/boolean_spec.rb +4 -0
  50. data/spec/cowtech-extensions/datetime_spec.rb +238 -79
  51. data/spec/cowtech-extensions/hash_spec.rb +5 -2
  52. data/spec/cowtech-extensions/math_spec.rb +14 -4
  53. data/spec/cowtech-extensions/object_spec.rb +19 -1
  54. data/spec/cowtech-extensions/pathname_spec.rb +5 -1
  55. data/spec/cowtech-extensions/settings_spec.rb +101 -0
  56. data/spec/cowtech-extensions/string_spec.rb +13 -0
  57. data/spec/cowtech-extensions_spec.rb +33 -13
  58. data/spec/spec_helper.rb +2 -5
  59. metadata +182 -97
  60. data/lib/cowtech-extensions/utils.rb +0 -74
data/.gitignore CHANGED
@@ -2,3 +2,4 @@ coverage/
2
2
  pkg/
3
3
  .idea/
4
4
  Gemfile.lock
5
+ .yardoc
data/.yardopts ADDED
@@ -0,0 +1 @@
1
+ -m markdown
data/README.md CHANGED
@@ -3,6 +3,16 @@
3
3
  Several Ruby object enhancements
4
4
  http://github.com/ShogunPanda/cowtech-extensions
5
5
 
6
+ ## Usage
7
+
8
+ ```ruby
9
+ require "cowtech-extensions"
10
+ Cowtech::Extensions.load!
11
+ ```
12
+
13
+ That's all!
14
+ See documentation for more informations.
15
+
6
16
  ## Contributing to cowtech-extensions
7
17
 
8
18
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
data/Rakefile CHANGED
@@ -9,7 +9,10 @@ require "rspec/core/rake_task"
9
9
 
10
10
  RSpec::Core::RakeTask.new("spec")
11
11
 
12
- desc "Run all specs with rcov"
13
- RSpec::Core::RakeTask.new("spec:coverage") do |t|
14
- t.rcov_opts = %q[--exclude "spec"]
12
+ namespace :spec do
13
+ desc "Run all specs with coverage"
14
+ task :coverage do
15
+ ENV["COWTECH_EXTENSIONS_COVERAGE"] = "TRUE"
16
+ Rake::Task["spec"].invoke
17
+ end
15
18
  end
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
10
10
  gem.name = "cowtech-extensions"
11
11
  gem.version = Cowtech::Extensions::Version::STRING
12
12
  gem.homepage = "http://github.com/ShogunPanda/cowtech-extensions"
13
- gem.summary = %q{Several Ruby object enhancementa.}
13
+ gem.summary = %q{Several Ruby object enhancements.}
14
14
  gem.description = %q{Several Ruby object enhancements.}
15
15
  gem.rubyforge_project = "cowtech-extensions"
16
16
 
@@ -22,10 +22,14 @@ Gem::Specification.new do |gem|
22
22
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
23
23
  gem.require_paths = ["lib"]
24
24
 
25
+ gem.add_dependency("json", "~> 1.7.0")
25
26
  gem.add_dependency("actionpack", "~> 3.0")
26
- gem.add_dependency("tzinfo", "~> 0.3.33")
27
+ gem.add_dependency("tzinfo", "~> 0.3.0")
27
28
 
28
- gem.add_development_dependency("rspec", "~> 2.11")
29
- gem.add_development_dependency("rcov", "~> 1.0.0")
30
- gem.add_development_dependency("pry", "~> 0.9.9")
29
+ gem.add_development_dependency("rspec", "~> 2.11.0")
30
+ gem.add_development_dependency("simplecov", "~> 0.6.0")
31
+ gem.add_development_dependency("pry", "~> 0.9.9.0")
32
+ gem.add_development_dependency("yard", "~> 0.8.0")
33
+ gem.add_development_dependency("redcarpet", "~> 2.1.0")
34
+ gem.add_development_dependency("github-markup", "~> 0.7.0")
31
35
  end
data/doc/Cowtech.html ADDED
@@ -0,0 +1,128 @@
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: Cowtech
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '';
20
+ framesUrl = "frames.html#!" + escape(window.location.href);
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 (C)</a> &raquo;
35
+
36
+
37
+ <span class="title">Cowtech</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: Cowtech
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/cowtech-extensions.rb<span class="defines">,<br />
83
+ lib/cowtech-extensions/math.rb,<br /> lib/cowtech-extensions/hash.rb,<br /> lib/cowtech-extensions/string.rb,<br /> lib/cowtech-extensions/object.rb,<br /> lib/cowtech-extensions/boolean.rb,<br /> lib/cowtech-extensions/version.rb,<br /> lib/cowtech-extensions/pathname.rb,<br /> lib/cowtech-extensions/settings.rb,<br /> lib/cowtech-extensions/datetime.rb,<br /> lib/cowtech-extensions/exceptions.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+ <p>This file is part of the cowtech-extensions gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
92
+ Licensed under the MIT license, which can be found at <a href="http://www.opensource.org/licenses/mit-license.php">http://www.opensource.org/licenses/mit-license.php</a>.</p>
93
+
94
+
95
+ </div>
96
+ </div>
97
+ <div class="tags">
98
+
99
+
100
+ </div><h2>Defined Under Namespace</h2>
101
+ <p class="children">
102
+
103
+
104
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Cowtech/Extensions.html" title="Cowtech::Extensions (module)">Extensions</a></span>
105
+
106
+
107
+
108
+
109
+ </p>
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ </div>
120
+
121
+ <div id="footer">
122
+ Generated on Thu Jul 19 17:17:50 2012 by
123
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
124
+ 0.8.2.1 (ruby-1.9.2).
125
+ </div>
126
+
127
+ </body>
128
+ </html>
@@ -0,0 +1,546 @@
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: Cowtech::Extensions
8
+
9
+ &mdash; Documentation by YARD 0.8.2.1
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
+ hasFrames = window.top.frames.main ? true : false;
19
+ relpath = '../';
20
+ framesUrl = "../frames.html#!" + escape(window.location.href);
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 (E)</a> &raquo;
35
+ <span class='title'><span class='object_link'><a href="../Cowtech.html" title="Cowtech (module)">Cowtech</a></span></span>
36
+ &raquo;
37
+ <span class="title">Extensions</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: Cowtech::Extensions
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/cowtech-extensions.rb<span class="defines">,<br />
83
+ lib/cowtech-extensions/math.rb,<br /> lib/cowtech-extensions/hash.rb,<br /> lib/cowtech-extensions/string.rb,<br /> lib/cowtech-extensions/object.rb,<br /> lib/cowtech-extensions/boolean.rb,<br /> lib/cowtech-extensions/version.rb,<br /> lib/cowtech-extensions/pathname.rb,<br /> lib/cowtech-extensions/settings.rb,<br /> lib/cowtech-extensions/datetime.rb,<br /> lib/cowtech-extensions/exceptions.rb</span>
84
+ </dd>
85
+
86
+ </dl>
87
+ <div class="clear"></div>
88
+
89
+ <h2>Overview</h2><div class="docstring">
90
+ <div class="discussion">
91
+ <p>Several Ruby object enhancements.</p>
92
+
93
+
94
+ </div>
95
+ </div>
96
+ <div class="tags">
97
+
98
+
99
+ </div><h2>Defined Under Namespace</h2>
100
+ <p class="children">
101
+
102
+
103
+ <strong class="modules">Modules:</strong> <span class='object_link'><a href="Extensions/Boolean.html" title="Cowtech::Extensions::Boolean (module)">Boolean</a></span>, <span class='object_link'><a href="Extensions/DateTime.html" title="Cowtech::Extensions::DateTime (module)">DateTime</a></span>, <span class='object_link'><a href="Extensions/Exceptions.html" title="Cowtech::Extensions::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Extensions/Hash.html" title="Cowtech::Extensions::Hash (module)">Hash</a></span>, <span class='object_link'><a href="Extensions/Math.html" title="Cowtech::Extensions::Math (module)">Math</a></span>, <span class='object_link'><a href="Extensions/Object.html" title="Cowtech::Extensions::Object (module)">Object</a></span>, <span class='object_link'><a href="Extensions/Pathname.html" title="Cowtech::Extensions::Pathname (module)">Pathname</a></span>, <span class='object_link'><a href="Extensions/String.html" title="Cowtech::Extensions::String (module)">String</a></span>, <span class='object_link'><a href="Extensions/TimeZone.html" title="Cowtech::Extensions::TimeZone (module)">TimeZone</a></span>, <span class='object_link'><a href="Extensions/Version.html" title="Cowtech::Extensions::Version (module)">Version</a></span>
104
+
105
+
106
+
107
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Extensions/Settings.html" title="Cowtech::Extensions::Settings (class)">Settings</a></span>
108
+
109
+
110
+ </p>
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+ <h2>
120
+ Class Method Summary
121
+ <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
122
+ </h2>
123
+
124
+ <ul class="summary">
125
+
126
+ <li class="public ">
127
+ <span class="summary_signature">
128
+
129
+ <a href="#is_ruby_18%3F-class_method" title="is_ruby_18? (class method)">+ (Boolean) <strong>is_ruby_18?</strong> </a>
130
+
131
+
132
+
133
+ </span>
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+ <span class="summary_desc"><div class='inline'><p>Checks if we are running under Ruby 1.8.</p>
144
+ </div></span>
145
+
146
+ </li>
147
+
148
+
149
+ <li class="public ">
150
+ <span class="summary_signature">
151
+
152
+ <a href="#load%21-class_method" title="load! (class method)">+ (Settings) <strong>load!</strong>(*what) </a>
153
+
154
+
155
+
156
+ </span>
157
+
158
+
159
+
160
+
161
+
162
+
163
+
164
+
165
+
166
+ <span class="summary_desc"><div class='inline'><p>Loads the extensions.</p>
167
+ </div></span>
168
+
169
+ </li>
170
+
171
+
172
+ <li class="public ">
173
+ <span class="summary_signature">
174
+
175
+ <a href="#settings-class_method" title="settings (class method)">+ (Settings) <strong>settings</strong> </a>
176
+
177
+
178
+
179
+ </span>
180
+
181
+
182
+
183
+
184
+
185
+
186
+
187
+
188
+
189
+ <span class="summary_desc"><div class='inline'><p>Returns the settings for the extensions.</p>
190
+ </div></span>
191
+
192
+ </li>
193
+
194
+
195
+ </ul>
196
+
197
+
198
+
199
+
200
+ <div id="class_method_details" class="method_details_list">
201
+ <h2>Class Method Details</h2>
202
+
203
+
204
+ <div class="method_details first">
205
+ <h3 class="signature first" id="is_ruby_18?-class_method">
206
+
207
+ + (<tt><span class='object_link'><a href="Extensions/Boolean.html" title="Cowtech::Extensions::Boolean (module)">Boolean</a></span></tt>) <strong>is_ruby_18?</strong>
208
+
209
+
210
+
211
+
212
+
213
+ </h3><div class="docstring">
214
+ <div class="discussion">
215
+ <p>Checks if we are running under Ruby 1.8</p>
216
+
217
+
218
+ </div>
219
+ </div>
220
+ <div class="tags">
221
+
222
+ <p class="tag_title">Returns:</p>
223
+ <ul class="return">
224
+
225
+ <li>
226
+
227
+
228
+ <span class='type'>(<tt><span class='object_link'><a href="Extensions/Boolean.html" title="Cowtech::Extensions::Boolean (module)">Boolean</a></span></tt>)</span>
229
+
230
+
231
+
232
+ &mdash;
233
+ <div class='inline'><p><code>true</code> for Ruby 1.8, <code>false</code> otherwise.</p>
234
+ </div>
235
+
236
+ </li>
237
+
238
+ </ul>
239
+
240
+ </div><table class="source_code">
241
+ <tr>
242
+ <td>
243
+ <pre class="lines">
244
+
245
+
246
+ 30
247
+ 31
248
+ 32</pre>
249
+ </td>
250
+ <td>
251
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 30</span>
252
+
253
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_is_ruby_18?'>is_ruby_18?</span>
254
+ <span class='const'>RUBY_VERSION</span> <span class='op'>=~</span> <span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^1\.8</span><span class='regexp_end'>/</span></span>
255
+ <span class='kw'>end</span></pre>
256
+ </td>
257
+ </tr>
258
+ </table>
259
+ </div>
260
+
261
+ <div class="method_details ">
262
+ <h3 class="signature " id="load!-class_method">
263
+
264
+ + (<tt><span class='object_link'><a href="Extensions/Settings.html" title="Cowtech::Extensions::Settings (class)">Settings</a></span></tt>) <strong>load!</strong>(*what)
265
+
266
+
267
+
268
+
269
+
270
+ </h3><div class="docstring">
271
+ <div class="discussion">
272
+ <p>Loads the extensions.</p>
273
+
274
+
275
+ </div>
276
+ </div>
277
+ <div class="tags">
278
+ <p class="tag_title">Parameters:</p>
279
+ <ul class="param">
280
+
281
+ <li>
282
+
283
+ <span class='name'>what</span>
284
+
285
+
286
+ <span class='type'>(<tt>Array</tt>)</span>
287
+
288
+
289
+
290
+ &mdash;
291
+ <div class='inline'><p>The modules to load. Valid values are:
292
+ @option object Extensions for all objects.
293
+ @option boolean Extensions for boolean values.
294
+ @option string Extensions for strings.
295
+ @option hash Extensions for hashs.
296
+ @option datetime Extensions date and time objects.
297
+ @option math Extensions for Math module.
298
+ @option pathname Extensions for path objects.</p>
299
+ </div>
300
+
301
+ </li>
302
+
303
+ </ul>
304
+
305
+ <p class="tag_title">Returns:</p>
306
+ <ul class="return">
307
+
308
+ <li>
309
+
310
+
311
+ <span class='type'>(<tt><span class='object_link'><a href="Extensions/Settings.html" title="Cowtech::Extensions::Settings (class)">Settings</a></span></tt>)</span>
312
+
313
+
314
+
315
+ &mdash;
316
+ <div class='inline'><p>The settings for the extensions.</p>
317
+ </div>
318
+
319
+ </li>
320
+
321
+ </ul>
322
+
323
+ </div><table class="source_code">
324
+ <tr>
325
+ <td>
326
+ <pre class="lines">
327
+
328
+
329
+ 52
330
+ 53
331
+ 54
332
+ 55
333
+ 56
334
+ 57
335
+ 58
336
+ 59
337
+ 60
338
+ 61
339
+ 62
340
+ 63
341
+ 64
342
+ 65
343
+ 66
344
+ 67
345
+ 68
346
+ 69
347
+ 70
348
+ 71
349
+ 72
350
+ 73
351
+ 74
352
+ 75
353
+ 76
354
+ 77
355
+ 78
356
+ 79
357
+ 80
358
+ 81
359
+ 82
360
+ 83
361
+ 84
362
+ 85
363
+ 86
364
+ 87
365
+ 88
366
+ 89
367
+ 90
368
+ 91
369
+ 92
370
+ 93
371
+ 94
372
+ 95
373
+ 96
374
+ 97
375
+ 98
376
+ 99
377
+ 100
378
+ 101
379
+ 102
380
+ 103
381
+ 104
382
+ 105
383
+ 106
384
+ 107
385
+ 108
386
+ 109
387
+ 110
388
+ 111
389
+ 112
390
+ 113
391
+ 114
392
+ 115
393
+ 116
394
+ 117
395
+ 118
396
+ 119
397
+ 120
398
+ 121</pre>
399
+ </td>
400
+ <td>
401
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 52</span>
402
+
403
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_load!'>load!</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_what'>what</span><span class='rparen'>)</span>
404
+ <span class='id identifier rubyid_what'>what</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</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'>boolean</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'>string</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'>hash</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'>datetime</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'>math</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'>pathname</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_count'>count</span> <span class='op'>==</span> <span class='int'>0</span>
405
+ <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_collect!'>collect!</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_w'>w</span><span class='op'>|</span> <span class='id identifier rubyid_w'>w</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span> <span class='rbrace'>}</span>
406
+
407
+ <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
408
+
409
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>object</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
410
+ <span class='op'>::</span><span class='const'>Object</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
411
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
412
+ <span class='kw'>end</span>
413
+ <span class='kw'>end</span>
414
+
415
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>boolean</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
416
+ <span class='op'>::</span><span class='const'>TrueClass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
417
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
418
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Boolean</span>
419
+ <span class='kw'>end</span>
420
+
421
+ <span class='op'>::</span><span class='const'>FalseClass</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
422
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Object</span>
423
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Boolean</span>
424
+ <span class='kw'>end</span>
425
+ <span class='kw'>end</span>
426
+
427
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>string</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
428
+ <span class='op'>::</span><span class='const'>String</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
429
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>String</span>
430
+ <span class='kw'>end</span>
431
+ <span class='kw'>end</span>
432
+
433
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>hash</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
434
+ <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
435
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Hash</span>
436
+ <span class='kw'>end</span>
437
+ <span class='kw'>end</span>
438
+
439
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>datetime</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
440
+ <span class='op'>::</span><span class='const'>Time</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
441
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
442
+ <span class='kw'>end</span>
443
+
444
+ <span class='op'>::</span><span class='const'>Date</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
445
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
446
+ <span class='kw'>end</span>
447
+
448
+ <span class='op'>::</span><span class='const'>DateTime</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
449
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>DateTime</span>
450
+ <span class='kw'>end</span>
451
+
452
+ <span class='op'>::</span><span class='const'>ActiveSupport</span><span class='op'>::</span><span class='const'>TimeZone</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
453
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>TimeZone</span>
454
+ <span class='kw'>end</span>
455
+ <span class='kw'>end</span>
456
+
457
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>math</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
458
+ <span class='op'>::</span><span class='const'>Math</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
459
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Math</span>
460
+ <span class='kw'>end</span>
461
+ <span class='kw'>end</span>
462
+
463
+ <span class='kw'>if</span> <span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pathname</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
464
+ <span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>pathname</span><span class='tstring_end'>&quot;</span></span>
465
+
466
+ <span class='op'>::</span><span class='const'>Pathname</span><span class='period'>.</span><span class='id identifier rubyid_class_eval'>class_eval</span> <span class='kw'>do</span>
467
+ <span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Pathname</span>
468
+ <span class='kw'>end</span>
469
+ <span class='kw'>end</span>
470
+
471
+ <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
472
+ <span class='kw'>end</span></pre>
473
+ </td>
474
+ </tr>
475
+ </table>
476
+ </div>
477
+
478
+ <div class="method_details ">
479
+ <h3 class="signature " id="settings-class_method">
480
+
481
+ + (<tt><span class='object_link'><a href="Extensions/Settings.html" title="Cowtech::Extensions::Settings (class)">Settings</a></span></tt>) <strong>settings</strong>
482
+
483
+
484
+
485
+
486
+
487
+ </h3><div class="docstring">
488
+ <div class="discussion">
489
+ <p>Returns the settings for the extensions</p>
490
+
491
+
492
+ </div>
493
+ </div>
494
+ <div class="tags">
495
+
496
+ <p class="tag_title">Returns:</p>
497
+ <ul class="return">
498
+
499
+ <li>
500
+
501
+
502
+ <span class='type'>(<tt><span class='object_link'><a href="Extensions/Settings.html" title="Cowtech::Extensions::Settings (class)">Settings</a></span></tt>)</span>
503
+
504
+
505
+
506
+ &mdash;
507
+ <div class='inline'><p>The settings for the extensions.</p>
508
+ </div>
509
+
510
+ </li>
511
+
512
+ </ul>
513
+
514
+ </div><table class="source_code">
515
+ <tr>
516
+ <td>
517
+ <pre class="lines">
518
+
519
+
520
+ 37
521
+ 38
522
+ 39</pre>
523
+ </td>
524
+ <td>
525
+ <pre class="code"><span class="info file"># File 'lib/cowtech-extensions.rb', line 37</span>
526
+
527
+ <span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
528
+ <span class='op'>::</span><span class='const'>Cowtech</span><span class='op'>::</span><span class='const'>Extensions</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
529
+ <span class='kw'>end</span></pre>
530
+ </td>
531
+ </tr>
532
+ </table>
533
+ </div>
534
+
535
+ </div>
536
+
537
+ </div>
538
+
539
+ <div id="footer">
540
+ Generated on Thu Jul 19 17:17:50 2012 by
541
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
542
+ 0.8.2.1 (ruby-1.9.2).
543
+ </div>
544
+
545
+ </body>
546
+ </html>