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
@@ -0,0 +1,125 @@
|
|
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::Exceptions
|
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 (E)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Lazier.html" title="Lazier (module)">Lazier</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Exceptions</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::Exceptions
|
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/exceptions.rb</dd>
|
83
|
+
|
84
|
+
</dl>
|
85
|
+
<div class="clear"></div>
|
86
|
+
|
87
|
+
<h2>Overview</h2><div class="docstring">
|
88
|
+
<div class="discussion">
|
89
|
+
<p>Exceptions for lazier.</p>
|
90
|
+
|
91
|
+
|
92
|
+
</div>
|
93
|
+
</div>
|
94
|
+
<div class="tags">
|
95
|
+
|
96
|
+
|
97
|
+
</div><h2>Defined Under Namespace</h2>
|
98
|
+
<p class="children">
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Exceptions/Dump.html" title="Lazier::Exceptions::Dump (class)">Dump</a></span>
|
104
|
+
|
105
|
+
|
106
|
+
</p>
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
|
116
|
+
</div>
|
117
|
+
|
118
|
+
<div id="footer">
|
119
|
+
Generated on Wed Aug 1 08:57:56 2012 by
|
120
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
121
|
+
0.8.2.1 (ruby-1.9.2).
|
122
|
+
</div>
|
123
|
+
|
124
|
+
</body>
|
125
|
+
</html>
|
@@ -0,0 +1,133 @@
|
|
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
|
+
Exception: Lazier::Exceptions::Dump
|
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 (D)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../../Lazier.html" title="Lazier (module)">Lazier</a></span></span> » <span class='title'><span class='object_link'><a href="../Exceptions.html" title="Lazier::Exceptions (module)">Exceptions</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Dump</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>Exception: Lazier::Exceptions::Dump
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
<dt class="r1">Inherits:</dt>
|
75
|
+
<dd class="r1">
|
76
|
+
<span class="inheritName">RuntimeError</span>
|
77
|
+
|
78
|
+
<ul class="fullTree">
|
79
|
+
<li>Object</li>
|
80
|
+
|
81
|
+
<li class="next">RuntimeError</li>
|
82
|
+
|
83
|
+
<li class="next">Lazier::Exceptions::Dump</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
<a href="#" class="inheritanceTree">show all</a>
|
87
|
+
|
88
|
+
</dd>
|
89
|
+
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
<dt class="r2 last">Defined in:</dt>
|
99
|
+
<dd class="r2 last">lib/lazier/exceptions.rb</dd>
|
100
|
+
|
101
|
+
</dl>
|
102
|
+
<div class="clear"></div>
|
103
|
+
|
104
|
+
<h2>Overview</h2><div class="docstring">
|
105
|
+
<div class="discussion">
|
106
|
+
<p>This exception is raised from <span class='object_link'><a href="../Object.html#debug_dump-instance_method" title="Lazier::Object#debug_dump (method)">Object#debug_dump</a></span> when <code>must_raise</code> is <code>true</code>.</p>
|
107
|
+
|
108
|
+
|
109
|
+
</div>
|
110
|
+
</div>
|
111
|
+
<div class="tags">
|
112
|
+
|
113
|
+
|
114
|
+
</div>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
</div>
|
125
|
+
|
126
|
+
<div id="footer">
|
127
|
+
Generated on Wed Aug 1 08:57:56 2012 by
|
128
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
129
|
+
0.8.2.1 (ruby-1.9.2).
|
130
|
+
</div>
|
131
|
+
|
132
|
+
</body>
|
133
|
+
</html>
|
@@ -0,0 +1,393 @@
|
|
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::Hash
|
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 (H)</a> »
|
35
|
+
<span class='title'><span class='object_link'><a href="../Lazier.html" title="Lazier (module)">Lazier</a></span></span>
|
36
|
+
»
|
37
|
+
<span class="title">Hash</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::Hash
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
</h1>
|
71
|
+
|
72
|
+
<dl class="box">
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<dt class="r1">Extended by:</dt>
|
77
|
+
<dd class="r1">ActiveSupport::Concern</dd>
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
|
85
|
+
<dt class="r2 last">Defined in:</dt>
|
86
|
+
<dd class="r2 last">lib/lazier/hash.rb</dd>
|
87
|
+
|
88
|
+
</dl>
|
89
|
+
<div class="clear"></div>
|
90
|
+
|
91
|
+
<h2>Overview</h2><div class="docstring">
|
92
|
+
<div class="discussion">
|
93
|
+
<p>Extensions for Hash objects.</p>
|
94
|
+
|
95
|
+
|
96
|
+
</div>
|
97
|
+
</div>
|
98
|
+
<div class="tags">
|
99
|
+
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<h2>
|
110
|
+
Instance Method Summary
|
111
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
112
|
+
</h2>
|
113
|
+
|
114
|
+
<ul class="summary">
|
115
|
+
|
116
|
+
<li class="public ">
|
117
|
+
<span class="summary_signature">
|
118
|
+
|
119
|
+
<a href="#method_missing-instance_method" title="#method_missing (instance method)">- (Object) <strong>method_missing</strong>(method, *args, &block) </a>
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
</span>
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
<span class="summary_desc"><div class='inline'><p>This is called when the user access a member using dotted notation.</p>
|
134
|
+
</div></span>
|
135
|
+
|
136
|
+
</li>
|
137
|
+
|
138
|
+
|
139
|
+
<li class="public ">
|
140
|
+
<span class="summary_signature">
|
141
|
+
|
142
|
+
<a href="#respond_to%3F-instance_method" title="#respond_to? (instance method)">- (Boolean) <strong>respond_to?</strong>(method) </a>
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
</span>
|
147
|
+
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
<span class="summary_desc"><div class='inline'><p>This is called when the user access a member using dotted notation.</p>
|
157
|
+
</div></span>
|
158
|
+
|
159
|
+
</li>
|
160
|
+
|
161
|
+
|
162
|
+
</ul>
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
<div id="method_missing_details" class="method_details_list">
|
167
|
+
<h2>Dynamic Method Handling</h2>
|
168
|
+
<p class="notice this">
|
169
|
+
This class handles dynamic methods through the <tt>method_missing</tt> method
|
170
|
+
|
171
|
+
</p>
|
172
|
+
|
173
|
+
<div class="method_details first">
|
174
|
+
<h3 class="signature first" id="method_missing-instance_method">
|
175
|
+
|
176
|
+
- (<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>) <strong>method_missing</strong>(method, *args, &block)
|
177
|
+
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
|
182
|
+
</h3><div class="docstring">
|
183
|
+
<div class="discussion">
|
184
|
+
<p>This is called when the user access a member using dotted notation.</p>
|
185
|
+
|
186
|
+
|
187
|
+
</div>
|
188
|
+
</div>
|
189
|
+
<div class="tags">
|
190
|
+
<p class="tag_title">Parameters:</p>
|
191
|
+
<ul class="param">
|
192
|
+
|
193
|
+
<li>
|
194
|
+
|
195
|
+
<span class='name'>method</span>
|
196
|
+
|
197
|
+
|
198
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
—
|
203
|
+
<div class='inline'><p>Key to search.</p>
|
204
|
+
</div>
|
205
|
+
|
206
|
+
</li>
|
207
|
+
|
208
|
+
<li>
|
209
|
+
|
210
|
+
<span class='name'>args</span>
|
211
|
+
|
212
|
+
|
213
|
+
<span class='type'>(<tt>Array</tt>)</span>
|
214
|
+
|
215
|
+
|
216
|
+
|
217
|
+
—
|
218
|
+
<div class='inline'><p><em>Unused.</em></p>
|
219
|
+
</div>
|
220
|
+
|
221
|
+
</li>
|
222
|
+
|
223
|
+
<li>
|
224
|
+
|
225
|
+
<span class='name'>block</span>
|
226
|
+
|
227
|
+
|
228
|
+
<span class='type'>(<tt>Proc</tt>)</span>
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
—
|
233
|
+
<div class='inline'><p><em>Unused.</em></p>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
</li>
|
237
|
+
|
238
|
+
</ul>
|
239
|
+
|
240
|
+
<p class="tag_title">Returns:</p>
|
241
|
+
<ul class="return">
|
242
|
+
|
243
|
+
<li>
|
244
|
+
|
245
|
+
|
246
|
+
<span class='type'>(<tt><span class='object_link'><a href="Object.html" title="Lazier::Object (module)">Object</a></span></tt>)</span>
|
247
|
+
|
248
|
+
|
249
|
+
|
250
|
+
—
|
251
|
+
<div class='inline'><p>The value for the key.</p>
|
252
|
+
</div>
|
253
|
+
|
254
|
+
</li>
|
255
|
+
|
256
|
+
</ul>
|
257
|
+
|
258
|
+
</div><table class="source_code">
|
259
|
+
<tr>
|
260
|
+
<td>
|
261
|
+
<pre class="lines">
|
262
|
+
|
263
|
+
|
264
|
+
18
|
265
|
+
19
|
266
|
+
20
|
267
|
+
21
|
268
|
+
22
|
269
|
+
23
|
270
|
+
24
|
271
|
+
25
|
272
|
+
26
|
273
|
+
27
|
274
|
+
28
|
275
|
+
29
|
276
|
+
30</pre>
|
277
|
+
</td>
|
278
|
+
<td>
|
279
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 18</span>
|
280
|
+
|
281
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
282
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
283
|
+
|
284
|
+
<span class='kw'>if</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
285
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span>
|
286
|
+
<span class='kw'>elsif</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span> <span class='kw'>then</span>
|
287
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='kw'>self</span><span class='lbracket'>[</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rbracket'>]</span>
|
288
|
+
<span class='kw'>else</span>
|
289
|
+
<span class='id identifier rubyid_rv'>rv</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_method_missing'>method_missing</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
290
|
+
<span class='kw'>end</span>
|
291
|
+
|
292
|
+
<span class='id identifier rubyid_rv'>rv</span>
|
293
|
+
<span class='kw'>end</span></pre>
|
294
|
+
</td>
|
295
|
+
</tr>
|
296
|
+
</table>
|
297
|
+
</div>
|
298
|
+
|
299
|
+
</div>
|
300
|
+
|
301
|
+
|
302
|
+
<div id="instance_method_details" class="method_details_list">
|
303
|
+
<h2>Instance Method Details</h2>
|
304
|
+
|
305
|
+
|
306
|
+
<div class="method_details first">
|
307
|
+
<h3 class="signature first" id="respond_to?-instance_method">
|
308
|
+
|
309
|
+
- (<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>) <strong>respond_to?</strong>(method)
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
|
314
|
+
|
315
|
+
</h3><div class="docstring">
|
316
|
+
<div class="discussion">
|
317
|
+
<p>This is called when the user access a member using dotted notation.</p>
|
318
|
+
|
319
|
+
|
320
|
+
</div>
|
321
|
+
</div>
|
322
|
+
<div class="tags">
|
323
|
+
<p class="tag_title">Parameters:</p>
|
324
|
+
<ul class="param">
|
325
|
+
|
326
|
+
<li>
|
327
|
+
|
328
|
+
<span class='name'>method</span>
|
329
|
+
|
330
|
+
|
331
|
+
<span class='type'>(<tt><span class='object_link'><a href="String.html" title="Lazier::String (module)">String</a></span>|Symbol</tt>)</span>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
—
|
336
|
+
<div class='inline'><p>Key to search.</p>
|
337
|
+
</div>
|
338
|
+
|
339
|
+
</li>
|
340
|
+
|
341
|
+
</ul>
|
342
|
+
|
343
|
+
<p class="tag_title">Returns:</p>
|
344
|
+
<ul class="return">
|
345
|
+
|
346
|
+
<li>
|
347
|
+
|
348
|
+
|
349
|
+
<span class='type'>(<tt><span class='object_link'><a href="Boolean.html" title="Lazier::Boolean (module)">Boolean</a></span></tt>)</span>
|
350
|
+
|
351
|
+
|
352
|
+
|
353
|
+
—
|
354
|
+
<div class='inline'><p><code>true</code> if the key exists, <code>false</code> otherwise.</p>
|
355
|
+
</div>
|
356
|
+
|
357
|
+
</li>
|
358
|
+
|
359
|
+
</ul>
|
360
|
+
|
361
|
+
</div><table class="source_code">
|
362
|
+
<tr>
|
363
|
+
<td>
|
364
|
+
<pre class="lines">
|
365
|
+
|
366
|
+
|
367
|
+
36
|
368
|
+
37
|
369
|
+
38</pre>
|
370
|
+
</td>
|
371
|
+
<td>
|
372
|
+
<pre class="code"><span class="info file"># File 'lib/lazier/hash.rb', line 36</span>
|
373
|
+
|
374
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
375
|
+
<span class='lparen'>(</span><span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span> <span class='op'>||</span> <span class='kw'>self</span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='kw'>true</span> <span class='op'>:</span> <span class='op'>::</span><span class='const'>Hash</span><span class='period'>.</span><span class='id identifier rubyid_respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='id identifier rubyid_method'>method</span><span class='rparen'>)</span>
|
376
|
+
<span class='kw'>end</span></pre>
|
377
|
+
</td>
|
378
|
+
</tr>
|
379
|
+
</table>
|
380
|
+
</div>
|
381
|
+
|
382
|
+
</div>
|
383
|
+
|
384
|
+
</div>
|
385
|
+
|
386
|
+
<div id="footer">
|
387
|
+
Generated on Wed Aug 1 08:57:55 2012 by
|
388
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
389
|
+
0.8.2.1 (ruby-1.9.2).
|
390
|
+
</div>
|
391
|
+
|
392
|
+
</body>
|
393
|
+
</html>
|