lazier 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +6 -0
- data/.travis.yml +8 -0
- data/.yardopts +1 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +82 -0
- data/README.md +33 -0
- data/Rakefile +18 -0
- data/doc/Lazier.html +557 -0
- data/doc/Lazier/Boolean.html +297 -0
- data/doc/Lazier/DateTime.html +787 -0
- data/doc/Lazier/DateTime/ClassMethods.html +1592 -0
- data/doc/Lazier/Exceptions.html +125 -0
- data/doc/Lazier/Exceptions/Dump.html +133 -0
- data/doc/Lazier/Hash.html +393 -0
- data/doc/Lazier/Math.html +130 -0
- data/doc/Lazier/Math/ClassMethods.html +362 -0
- data/doc/Lazier/Object.html +1565 -0
- data/doc/Lazier/Pathname.html +225 -0
- data/doc/Lazier/Settings.html +1249 -0
- data/doc/Lazier/String.html +471 -0
- data/doc/Lazier/TimeZone.html +1675 -0
- data/doc/Lazier/TimeZone/ClassMethods.html +1055 -0
- data/doc/Lazier/Version.html +189 -0
- data/doc/_index.html +306 -0
- data/doc/class_list.html +53 -0
- data/doc/css/common.css +1 -0
- data/doc/css/full_list.css +57 -0
- data/doc/css/style.css +328 -0
- data/doc/file.README.html +107 -0
- data/doc/file_list.html +55 -0
- data/doc/frames.html +28 -0
- data/doc/index.html +107 -0
- data/doc/js/app.js +214 -0
- data/doc/js/full_list.js +173 -0
- data/doc/js/jquery.js +4 -0
- data/doc/method_list.html +652 -0
- data/doc/top-level-namespace.html +112 -0
- data/lazier.gemspec +36 -0
- data/lib/lazier.rb +127 -0
- data/lib/lazier/boolean.rb +26 -0
- data/lib/lazier/datetime.rb +548 -0
- data/lib/lazier/exceptions.rb +14 -0
- data/lib/lazier/hash.rb +40 -0
- data/lib/lazier/math.rb +47 -0
- data/lib/lazier/object.rb +163 -0
- data/lib/lazier/pathname.rb +26 -0
- data/lib/lazier/settings.rb +118 -0
- data/lib/lazier/string.rb +54 -0
- data/lib/lazier/version.rb +24 -0
- data/spec/coverage_helper.rb +19 -0
- data/spec/cowtech-extensions/boolean_spec.rb +30 -0
- data/spec/cowtech-extensions/datetime_spec.rb +352 -0
- data/spec/cowtech-extensions/hash_spec.rb +30 -0
- data/spec/cowtech-extensions/math_spec.rb +41 -0
- data/spec/cowtech-extensions/object_spec.rb +231 -0
- data/spec/cowtech-extensions/pathname_spec.rb +21 -0
- data/spec/cowtech-extensions/settings_spec.rb +118 -0
- data/spec/cowtech-extensions/string_spec.rb +45 -0
- data/spec/lazier_spec.rb +57 -0
- data/spec/spec_helper.rb +16 -0
- metadata +292 -0
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/.yardopts
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
-m markdown
|
data/Gemfile
ADDED
@@ -0,0 +1,9 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# This file is part of the lazier gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
|
+
#
|
6
|
+
|
7
|
+
source "http://rubygems.org"
|
8
|
+
|
9
|
+
gemspec
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
lazier (1.0.0)
|
5
|
+
actionpack (~> 3.0)
|
6
|
+
json (~> 1.7.0)
|
7
|
+
tzinfo (~> 0.3.0)
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: http://rubygems.org/
|
11
|
+
specs:
|
12
|
+
actionpack (3.2.6)
|
13
|
+
activemodel (= 3.2.6)
|
14
|
+
activesupport (= 3.2.6)
|
15
|
+
builder (~> 3.0.0)
|
16
|
+
erubis (~> 2.7.0)
|
17
|
+
journey (~> 1.0.1)
|
18
|
+
rack (~> 1.4.0)
|
19
|
+
rack-cache (~> 1.2)
|
20
|
+
rack-test (~> 0.6.1)
|
21
|
+
sprockets (~> 2.1.3)
|
22
|
+
activemodel (3.2.6)
|
23
|
+
activesupport (= 3.2.6)
|
24
|
+
builder (~> 3.0.0)
|
25
|
+
activesupport (3.2.6)
|
26
|
+
i18n (~> 0.6)
|
27
|
+
multi_json (~> 1.0)
|
28
|
+
builder (3.0.0)
|
29
|
+
coderay (1.0.7)
|
30
|
+
diff-lcs (1.1.3)
|
31
|
+
erubis (2.7.0)
|
32
|
+
github-markup (0.7.2)
|
33
|
+
hike (1.2.1)
|
34
|
+
i18n (0.6.0)
|
35
|
+
journey (1.0.4)
|
36
|
+
json (1.7.3)
|
37
|
+
method_source (0.8)
|
38
|
+
multi_json (1.3.6)
|
39
|
+
pry (0.9.10)
|
40
|
+
coderay (~> 1.0.5)
|
41
|
+
method_source (~> 0.8)
|
42
|
+
slop (~> 3.3.1)
|
43
|
+
rack (1.4.1)
|
44
|
+
rack-cache (1.2)
|
45
|
+
rack (>= 0.4)
|
46
|
+
rack-test (0.6.1)
|
47
|
+
rack (>= 1.0)
|
48
|
+
rake (0.9.2.2)
|
49
|
+
redcarpet (2.1.1)
|
50
|
+
rspec (2.11.0)
|
51
|
+
rspec-core (~> 2.11.0)
|
52
|
+
rspec-expectations (~> 2.11.0)
|
53
|
+
rspec-mocks (~> 2.11.0)
|
54
|
+
rspec-core (2.11.0)
|
55
|
+
rspec-expectations (2.11.1)
|
56
|
+
diff-lcs (~> 1.1.3)
|
57
|
+
rspec-mocks (2.11.0)
|
58
|
+
simplecov (0.6.4)
|
59
|
+
multi_json (~> 1.0)
|
60
|
+
simplecov-html (~> 0.5.3)
|
61
|
+
simplecov-html (0.5.3)
|
62
|
+
slop (3.3.2)
|
63
|
+
sprockets (2.1.3)
|
64
|
+
hike (~> 1.2)
|
65
|
+
rack (~> 1.0)
|
66
|
+
tilt (~> 1.1, != 1.3.0)
|
67
|
+
tilt (1.3.3)
|
68
|
+
tzinfo (0.3.33)
|
69
|
+
yard (0.8.2.1)
|
70
|
+
|
71
|
+
PLATFORMS
|
72
|
+
ruby
|
73
|
+
|
74
|
+
DEPENDENCIES
|
75
|
+
github-markup (~> 0.7.0)
|
76
|
+
lazier!
|
77
|
+
pry
|
78
|
+
rake (~> 0.9.0)
|
79
|
+
redcarpet (~> 2.1.0)
|
80
|
+
rspec (~> 2.11.0)
|
81
|
+
simplecov (~> 0.6.0)
|
82
|
+
yard (~> 0.8.0)
|
data/README.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
# lazier
|
2
|
+
|
3
|
+
[![Build Status](https://secure.travis-ci.org/ShogunPanda/lazier.png?branch=master)](http://travis-ci.org/ShogunPanda/lazier)
|
4
|
+
[![Dependency Status](https://gemnasium.com/ShogunPanda/lazier.png?travis)](https://gemnasium.com/ShogunPanda/lazier)
|
5
|
+
|
6
|
+
Several Ruby object enhancements.
|
7
|
+
|
8
|
+
http://github.com/ShogunPanda/lazier
|
9
|
+
|
10
|
+
## Usage
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require "lazier"
|
14
|
+
Lazier.load!
|
15
|
+
```
|
16
|
+
|
17
|
+
That's all!
|
18
|
+
See documentation for more informations.
|
19
|
+
|
20
|
+
## Contributing to lazier
|
21
|
+
|
22
|
+
* Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
|
23
|
+
* Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
|
24
|
+
* Fork the project.
|
25
|
+
* Start a feature/bugfix branch.
|
26
|
+
* Commit and push until you are happy with your contribution.
|
27
|
+
* Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
|
28
|
+
* Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
|
29
|
+
|
30
|
+
## Copyright
|
31
|
+
|
32
|
+
Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
|
33
|
+
Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
#
|
3
|
+
# This file is part of the lazier gem. Copyright (C) 2011 and above Shogun <shogun_panda@me.com>.
|
4
|
+
# Licensed under the MIT license, which can be found at http://www.opensource.org/licenses/mit-license.php.
|
5
|
+
#
|
6
|
+
|
7
|
+
require "bundler/gem_tasks"
|
8
|
+
require "rspec/core/rake_task"
|
9
|
+
|
10
|
+
RSpec::Core::RakeTask.new("spec")
|
11
|
+
|
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
|
18
|
+
end
|
data/doc/Lazier.html
ADDED
@@ -0,0 +1,557 @@
|
|
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: Lazier
|
8
|
+
|
9
|
+
— 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 (L)</a> »
|
35
|
+
|
36
|
+
|
37
|
+
<span class="title">Lazier</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: Lazier
|
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/lazier.rb<span class="defines">,<br />
|
83
|
+
lib/lazier/math.rb,<br /> lib/lazier/hash.rb,<br /> lib/lazier/string.rb,<br /> lib/lazier/object.rb,<br /> lib/lazier/boolean.rb,<br /> lib/lazier/version.rb,<br /> lib/lazier/pathname.rb,<br /> lib/lazier/settings.rb,<br /> lib/lazier/datetime.rb,<br /> lib/lazier/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 lazier 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="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span>, <span class='object_link'><a href="Lazier/DateTime.html" title="Lazier::DateTime (module)">DateTime</a></span>, <span class='object_link'><a href="Lazier/Exceptions.html" title="Lazier::Exceptions (module)">Exceptions</a></span>, <span class='object_link'><a href="Lazier/Hash.html" title="Lazier::Hash (module)">Hash</a></span>, <span class='object_link'><a href="Lazier/Math.html" title="Lazier::Math (module)">Math</a></span>, <span class='object_link'><a href="Lazier/Object.html" title="Lazier::Object (module)">Object</a></span>, <span class='object_link'><a href="Lazier/Pathname.html" title="Lazier::Pathname (module)">Pathname</a></span>, <span class='object_link'><a href="Lazier/String.html" title="Lazier::String (module)">String</a></span>, <span class='object_link'><a href="Lazier/TimeZone.html" title="Lazier::TimeZone (module)">TimeZone</a></span>, <span class='object_link'><a href="Lazier/Version.html" title="Lazier::Version (module)">Version</a></span>
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span>
|
109
|
+
|
110
|
+
|
111
|
+
</p>
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
<h2>
|
121
|
+
Class Method Summary
|
122
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
123
|
+
</h2>
|
124
|
+
|
125
|
+
<ul class="summary">
|
126
|
+
|
127
|
+
<li class="public ">
|
128
|
+
<span class="summary_signature">
|
129
|
+
|
130
|
+
<a href="#is_ruby_18%3F-class_method" title="is_ruby_18? (class method)">+ (Boolean) <strong>is_ruby_18?</strong> </a>
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
<span class="summary_desc"><div class='inline'><p>Checks if we are running under Ruby 1.8.</p>
|
145
|
+
</div></span>
|
146
|
+
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="public ">
|
151
|
+
<span class="summary_signature">
|
152
|
+
|
153
|
+
<a href="#load%21-class_method" title="load! (class method)">+ (Settings) <strong>load!</strong>(*what) </a>
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'><p>Loads the extensions.</p>
|
168
|
+
</div></span>
|
169
|
+
|
170
|
+
</li>
|
171
|
+
|
172
|
+
|
173
|
+
<li class="public ">
|
174
|
+
<span class="summary_signature">
|
175
|
+
|
176
|
+
<a href="#settings-class_method" title="settings (class method)">+ (Settings) <strong>settings</strong> </a>
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
<span class="summary_desc"><div class='inline'><p>Returns the settings for the extensions.</p>
|
191
|
+
</div></span>
|
192
|
+
|
193
|
+
</li>
|
194
|
+
|
195
|
+
|
196
|
+
</ul>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
<div id="class_method_details" class="method_details_list">
|
202
|
+
<h2>Class Method Details</h2>
|
203
|
+
|
204
|
+
|
205
|
+
<div class="method_details first">
|
206
|
+
<h3 class="signature first" id="is_ruby_18?-class_method">
|
207
|
+
|
208
|
+
+ (<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>is_ruby_18?</strong>
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
</h3><div class="docstring">
|
215
|
+
<div class="discussion">
|
216
|
+
<p>Checks if we are running under Ruby 1.8</p>
|
217
|
+
|
218
|
+
|
219
|
+
</div>
|
220
|
+
</div>
|
221
|
+
<div class="tags">
|
222
|
+
|
223
|
+
<p class="tag_title">Returns:</p>
|
224
|
+
<ul class="return">
|
225
|
+
|
226
|
+
<li>
|
227
|
+
|
228
|
+
|
229
|
+
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
—
|
234
|
+
<div class='inline'><p><code>true</code> for Ruby 1.8, <code>false</code> otherwise.</p>
|
235
|
+
</div>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
</ul>
|
240
|
+
|
241
|
+
</div><table class="source_code">
|
242
|
+
<tr>
|
243
|
+
<td>
|
244
|
+
<pre class="lines">
|
245
|
+
|
246
|
+
|
247
|
+
30
|
248
|
+
31
|
249
|
+
32</pre>
|
250
|
+
</td>
|
251
|
+
<td>
|
252
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 30</span>
|
253
|
+
|
254
|
+
<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>
|
255
|
+
<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>
|
256
|
+
<span class='kw'>end</span></pre>
|
257
|
+
</td>
|
258
|
+
</tr>
|
259
|
+
</table>
|
260
|
+
</div>
|
261
|
+
|
262
|
+
<div class="method_details ">
|
263
|
+
<h3 class="signature " id="load!-class_method">
|
264
|
+
|
265
|
+
+ (<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>load!</strong>(*what)
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
|
270
|
+
|
271
|
+
</h3><div class="docstring">
|
272
|
+
<div class="discussion">
|
273
|
+
<p>Loads the extensions.</p>
|
274
|
+
|
275
|
+
|
276
|
+
</div>
|
277
|
+
</div>
|
278
|
+
<div class="tags">
|
279
|
+
<p class="tag_title">Parameters:</p>
|
280
|
+
<ul class="param">
|
281
|
+
|
282
|
+
<li>
|
283
|
+
|
284
|
+
<span class='name'>what</span>
|
285
|
+
|
286
|
+
|
287
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
—
|
292
|
+
<div class='inline'><p>The modules to load. Valid values are:
|
293
|
+
@option object Extensions for all objects.
|
294
|
+
@option boolean Extensions for boolean values.
|
295
|
+
@option string Extensions for strings.
|
296
|
+
@option hash Extensions for hashs.
|
297
|
+
@option datetime Extensions date and time objects.
|
298
|
+
@option math Extensions for Math module.
|
299
|
+
@option pathname Extensions for path objects.</p>
|
300
|
+
</div>
|
301
|
+
|
302
|
+
</li>
|
303
|
+
|
304
|
+
</ul>
|
305
|
+
|
306
|
+
<p class="tag_title">Returns:</p>
|
307
|
+
<ul class="return">
|
308
|
+
|
309
|
+
<li>
|
310
|
+
|
311
|
+
|
312
|
+
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>)</span>
|
313
|
+
|
314
|
+
|
315
|
+
|
316
|
+
—
|
317
|
+
<div class='inline'><p>The settings for the extensions.</p>
|
318
|
+
</div>
|
319
|
+
|
320
|
+
</li>
|
321
|
+
|
322
|
+
</ul>
|
323
|
+
|
324
|
+
</div><table class="source_code">
|
325
|
+
<tr>
|
326
|
+
<td>
|
327
|
+
<pre class="lines">
|
328
|
+
|
329
|
+
|
330
|
+
52
|
331
|
+
53
|
332
|
+
54
|
333
|
+
55
|
334
|
+
56
|
335
|
+
57
|
336
|
+
58
|
337
|
+
59
|
338
|
+
60
|
339
|
+
61
|
340
|
+
62
|
341
|
+
63
|
342
|
+
64
|
343
|
+
65
|
344
|
+
66
|
345
|
+
67
|
346
|
+
68
|
347
|
+
69
|
348
|
+
70
|
349
|
+
71
|
350
|
+
72
|
351
|
+
73
|
352
|
+
74
|
353
|
+
75
|
354
|
+
76
|
355
|
+
77
|
356
|
+
78
|
357
|
+
79
|
358
|
+
80
|
359
|
+
81
|
360
|
+
82
|
361
|
+
83
|
362
|
+
84
|
363
|
+
85
|
364
|
+
86
|
365
|
+
87
|
366
|
+
88
|
367
|
+
89
|
368
|
+
90
|
369
|
+
91
|
370
|
+
92
|
371
|
+
93
|
372
|
+
94
|
373
|
+
95
|
374
|
+
96
|
375
|
+
97
|
376
|
+
98
|
377
|
+
99
|
378
|
+
100
|
379
|
+
101
|
380
|
+
102
|
381
|
+
103
|
382
|
+
104
|
383
|
+
105
|
384
|
+
106
|
385
|
+
107
|
386
|
+
108
|
387
|
+
109
|
388
|
+
110
|
389
|
+
111
|
390
|
+
112
|
391
|
+
113
|
392
|
+
114
|
393
|
+
115
|
394
|
+
116
|
395
|
+
117
|
396
|
+
118
|
397
|
+
119
|
398
|
+
120
|
399
|
+
121
|
400
|
+
122
|
401
|
+
123
|
402
|
+
124
|
403
|
+
125
|
404
|
+
126</pre>
|
405
|
+
</td>
|
406
|
+
<td>
|
407
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 52</span>
|
408
|
+
|
409
|
+
<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>
|
410
|
+
<span class='id identifier rubyid_what'>what</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>string</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>hash</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>datetime</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>math</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>pathname</span><span class='tstring_end'>"</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>
|
411
|
+
<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>
|
412
|
+
|
413
|
+
<span class='comment'># Dependency resolving
|
414
|
+
</span> <span class='id identifier rubyid_what'>what</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span> <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'>"</span><span class='tstring_content'>datetime</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
415
|
+
<span class='id identifier rubyid_what'>what</span> <span class='op'><<</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span> <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'>"</span><span class='tstring_content'>math</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
416
|
+
<span class='id identifier rubyid_what'>what</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='period'>.</span><span class='id identifier rubyid_uniq!'>uniq!</span>
|
417
|
+
|
418
|
+
<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'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
419
|
+
<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>
|
420
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span>
|
421
|
+
<span class='kw'>end</span>
|
422
|
+
<span class='kw'>end</span>
|
423
|
+
|
424
|
+
<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'>"</span><span class='tstring_content'>boolean</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
425
|
+
<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>
|
426
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span>
|
427
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Boolean</span>
|
428
|
+
<span class='kw'>end</span>
|
429
|
+
|
430
|
+
<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>
|
431
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Object</span>
|
432
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Boolean</span>
|
433
|
+
<span class='kw'>end</span>
|
434
|
+
<span class='kw'>end</span>
|
435
|
+
|
436
|
+
<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'>"</span><span class='tstring_content'>string</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
437
|
+
<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>
|
438
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>String</span>
|
439
|
+
<span class='kw'>end</span>
|
440
|
+
<span class='kw'>end</span>
|
441
|
+
|
442
|
+
<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'>"</span><span class='tstring_content'>hash</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
443
|
+
<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>
|
444
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Hash</span>
|
445
|
+
<span class='kw'>end</span>
|
446
|
+
<span class='kw'>end</span>
|
447
|
+
|
448
|
+
<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'>"</span><span class='tstring_content'>datetime</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
449
|
+
<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>
|
450
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>DateTime</span>
|
451
|
+
<span class='kw'>end</span>
|
452
|
+
|
453
|
+
<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>
|
454
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>DateTime</span>
|
455
|
+
<span class='kw'>end</span>
|
456
|
+
|
457
|
+
<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>
|
458
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>DateTime</span>
|
459
|
+
<span class='kw'>end</span>
|
460
|
+
|
461
|
+
<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>
|
462
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>TimeZone</span>
|
463
|
+
<span class='kw'>end</span>
|
464
|
+
<span class='kw'>end</span>
|
465
|
+
|
466
|
+
<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'>"</span><span class='tstring_content'>math</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
467
|
+
<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>
|
468
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Math</span>
|
469
|
+
<span class='kw'>end</span>
|
470
|
+
<span class='kw'>end</span>
|
471
|
+
|
472
|
+
<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'>"</span><span class='tstring_content'>pathname</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span> <span class='kw'>then</span>
|
473
|
+
<span class='id identifier rubyid_require'>require</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>pathname</span><span class='tstring_end'>"</span></span>
|
474
|
+
|
475
|
+
<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>
|
476
|
+
<span class='id identifier rubyid_include'>include</span> <span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Pathname</span>
|
477
|
+
<span class='kw'>end</span>
|
478
|
+
<span class='kw'>end</span>
|
479
|
+
|
480
|
+
<span class='kw'>yield</span> <span class='kw'>if</span> <span class='id identifier rubyid_block_given?'>block_given?</span>
|
481
|
+
|
482
|
+
<span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
483
|
+
<span class='kw'>end</span></pre>
|
484
|
+
</td>
|
485
|
+
</tr>
|
486
|
+
</table>
|
487
|
+
</div>
|
488
|
+
|
489
|
+
<div class="method_details ">
|
490
|
+
<h3 class="signature " id="settings-class_method">
|
491
|
+
|
492
|
+
+ (<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>) <strong>settings</strong>
|
493
|
+
|
494
|
+
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
</h3><div class="docstring">
|
499
|
+
<div class="discussion">
|
500
|
+
<p>Returns the settings for the extensions</p>
|
501
|
+
|
502
|
+
|
503
|
+
</div>
|
504
|
+
</div>
|
505
|
+
<div class="tags">
|
506
|
+
|
507
|
+
<p class="tag_title">Returns:</p>
|
508
|
+
<ul class="return">
|
509
|
+
|
510
|
+
<li>
|
511
|
+
|
512
|
+
|
513
|
+
<span class='type'>(<tt><span class='object_link'><a href="Lazier/Settings.html" title="Lazier::Settings (class)">Settings</a></span></tt>)</span>
|
514
|
+
|
515
|
+
|
516
|
+
|
517
|
+
—
|
518
|
+
<div class='inline'><p>The settings for the extensions.</p>
|
519
|
+
</div>
|
520
|
+
|
521
|
+
</li>
|
522
|
+
|
523
|
+
</ul>
|
524
|
+
|
525
|
+
</div><table class="source_code">
|
526
|
+
<tr>
|
527
|
+
<td>
|
528
|
+
<pre class="lines">
|
529
|
+
|
530
|
+
|
531
|
+
37
|
532
|
+
38
|
533
|
+
39</pre>
|
534
|
+
</td>
|
535
|
+
<td>
|
536
|
+
<pre class="code"><span class="info file"># File 'lib/lazier.rb', line 37</span>
|
537
|
+
|
538
|
+
<span class='kw'>def</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_settings'>settings</span>
|
539
|
+
<span class='op'>::</span><span class='const'>Lazier</span><span class='op'>::</span><span class='const'>Settings</span><span class='period'>.</span><span class='id identifier rubyid_instance'>instance</span>
|
540
|
+
<span class='kw'>end</span></pre>
|
541
|
+
</td>
|
542
|
+
</tr>
|
543
|
+
</table>
|
544
|
+
</div>
|
545
|
+
|
546
|
+
</div>
|
547
|
+
|
548
|
+
</div>
|
549
|
+
|
550
|
+
<div id="footer">
|
551
|
+
Generated on Wed Aug 1 08:57:55 2012 by
|
552
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
553
|
+
0.8.2.1 (ruby-1.9.2).
|
554
|
+
</div>
|
555
|
+
|
556
|
+
</body>
|
557
|
+
</html>
|