smart_month 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/MIT-LICENSE +20 -0
- data/README +33 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/lib/month.rb +26 -0
- data/lib/smart_month.rb +11 -0
- data/lib/smart_month/calculations.rb +87 -0
- data/lib/smart_month/collection.rb +51 -0
- data/lib/smart_month/extensions/date.rb +19 -0
- data/lib/smart_month/magic.rb +71 -0
- data/lib/smart_month/math.rb +41 -0
- data/lib/smart_month/rulesets.rb +151 -0
- data/lib/smart_month/util.rb +37 -0
- data/pkg/smart_month-1.0.0.gem +0 -0
- data/rdoc/classes/Date.html +209 -0
- data/rdoc/classes/Month.html +189 -0
- data/rdoc/classes/SmartMonth.html +136 -0
- data/rdoc/classes/SmartMonth/Calculations.html +383 -0
- data/rdoc/classes/SmartMonth/Collection.html +306 -0
- data/rdoc/classes/SmartMonth/Magic.html +214 -0
- data/rdoc/classes/SmartMonth/Magic/MonthFactory.html +178 -0
- data/rdoc/classes/SmartMonth/Math.html +311 -0
- data/rdoc/classes/SmartMonth/Rulesets.html +419 -0
- data/rdoc/classes/SmartMonth/Util.html +302 -0
- data/rdoc/classes/Time.html +152 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README.html +170 -0
- data/rdoc/files/lib/month_rb.html +113 -0
- data/rdoc/files/lib/smart_month/calculations_rb.html +101 -0
- data/rdoc/files/lib/smart_month/collection_rb.html +101 -0
- data/rdoc/files/lib/smart_month/extensions/date_rb.html +108 -0
- data/rdoc/files/lib/smart_month/magic_rb.html +101 -0
- data/rdoc/files/lib/smart_month/math_rb.html +101 -0
- data/rdoc/files/lib/smart_month/rulesets_rb.html +108 -0
- data/rdoc/files/lib/smart_month/util_rb.html +101 -0
- data/rdoc/files/lib/smart_month_rb.html +108 -0
- data/rdoc/fr_class_index.html +37 -0
- data/rdoc/fr_file_index.html +36 -0
- data/rdoc/fr_method_index.html +74 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/smart_month.gemspec +179 -0
- data/test/spec/date/accessor_spec.rb +91 -0
- data/test/spec/date/add_month_spec.rb +24 -0
- data/test/spec/date/add_spec.rb +23 -0
- data/test/spec/date/boat_spec.rb +20 -0
- data/test/spec/date/civil_spec.rb +28 -0
- data/test/spec/date/commercial_spec.rb +29 -0
- data/test/spec/date/constants_spec.rb +41 -0
- data/test/spec/date/conversions_spec.rb +153 -0
- data/test/spec/date/downto_spec.rb +18 -0
- data/test/spec/date/eql_spec.rb +10 -0
- data/test/spec/date/gregorian_spec.rb +28 -0
- data/test/spec/date/hash_spec.rb +14 -0
- data/test/spec/date/infinity_spec.rb +77 -0
- data/test/spec/date/julian_spec.rb +52 -0
- data/test/spec/date/minus_month_spec.rb +23 -0
- data/test/spec/date/minus_spec.rb +30 -0
- data/test/spec/date/new_spec.rb +9 -0
- data/test/spec/date/neww_spec.rb +9 -0
- data/test/spec/date/ordinal_spec.rb +29 -0
- data/test/spec/date/parse_spec.rb +149 -0
- data/test/spec/date/relationship_spec.rb +20 -0
- data/test/spec/date/shared/civil.rb +66 -0
- data/test/spec/date/shared/commercial.rb +39 -0
- data/test/spec/date/shared/parse.rb +54 -0
- data/test/spec/date/shared/parse_eu.rb +30 -0
- data/test/spec/date/shared/parse_us.rb +29 -0
- data/test/spec/date/step_spec.rb +56 -0
- data/test/spec/date/strftime_spec.rb +205 -0
- data/test/spec/date/strptime_spec.rb +143 -0
- data/test/spec/date/upto_spec.rb +18 -0
- data/test/spec/parsedate/parsedate.rb +95 -0
- data/test/spec/time/httpdate_spec.rb +21 -0
- data/test/spec/time/iso8601_spec.rb +7 -0
- data/test/spec/time/rfc2822_spec.rb +7 -0
- data/test/spec/time/rfc822_spec.rb +7 -0
- data/test/spec/time/shared/rfc2822.rb +65 -0
- data/test/spec/time/shared/xmlschema.rb +53 -0
- data/test/spec/time/xmlschema_spec.rb +7 -0
- data/test/spec_helper.rb +56 -0
- data/test/test_helper.rb +4 -0
- data/test/unit/calculations_test.rb +82 -0
- data/test/unit/collection_test.rb +42 -0
- data/test/unit/magic_test.rb +37 -0
- data/test/unit/math_test.rb +30 -0
- data/test/unit/rulesets_test.rb +94 -0
- data/test/unit/samples/test_ruleset.yml +6 -0
- data/test/unit/util_test.rb +29 -0
- metadata +196 -0
@@ -0,0 +1,37 @@
|
|
1
|
+
module SmartMonth
|
2
|
+
# Responsible for odds and ends.
|
3
|
+
module Util
|
4
|
+
# returns the month as a string.
|
5
|
+
def inspect
|
6
|
+
"#{self.to_s}"
|
7
|
+
end
|
8
|
+
|
9
|
+
# returns the month and the year as a string.
|
10
|
+
def inspect!
|
11
|
+
"#{self.to_s} #{self.year}"
|
12
|
+
end
|
13
|
+
|
14
|
+
# returns the month as a string.
|
15
|
+
def to_s
|
16
|
+
Month::NAMES[self.month]
|
17
|
+
end
|
18
|
+
|
19
|
+
# returns the month as a fixnum.
|
20
|
+
def to_i
|
21
|
+
Month::NAMES.index(self.to_s)
|
22
|
+
end
|
23
|
+
# add support for int as well.
|
24
|
+
alias :to_int :to_i
|
25
|
+
|
26
|
+
# returns the year of the current month.
|
27
|
+
def year
|
28
|
+
@date.year
|
29
|
+
end
|
30
|
+
|
31
|
+
# returns the month of the current month.
|
32
|
+
def month
|
33
|
+
@date.month
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
Binary file
|
@@ -0,0 +1,209 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Date</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Date</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/smart_month/extensions/date_rb.html">
|
59
|
+
lib/smart_month/extensions/date.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
<div id="description">
|
82
|
+
<p>
|
83
|
+
mixin some new methods to the <a href="Date.html">Date</a> class.
|
84
|
+
</p>
|
85
|
+
|
86
|
+
</div>
|
87
|
+
|
88
|
+
|
89
|
+
</div>
|
90
|
+
|
91
|
+
<div id="method-list">
|
92
|
+
<h3 class="section-bar">Methods</h3>
|
93
|
+
|
94
|
+
<div class="name-list">
|
95
|
+
<a href="#M000003">inspect</a>
|
96
|
+
<a href="#M000005">to_day</a>
|
97
|
+
<a href="#M000004">to_i</a>
|
98
|
+
</div>
|
99
|
+
</div>
|
100
|
+
|
101
|
+
</div>
|
102
|
+
|
103
|
+
|
104
|
+
<!-- if includes -->
|
105
|
+
|
106
|
+
<div id="section">
|
107
|
+
|
108
|
+
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
|
114
|
+
|
115
|
+
<!-- if method_list -->
|
116
|
+
<div id="methods">
|
117
|
+
<h3 class="section-bar">Public Instance methods</h3>
|
118
|
+
|
119
|
+
<div id="method-M000003" class="method-detail">
|
120
|
+
<a name="M000003"></a>
|
121
|
+
|
122
|
+
<div class="method-heading">
|
123
|
+
<a href="#M000003" class="method-signature">
|
124
|
+
<span class="method-name">inspect</span><span class="method-args">()</span>
|
125
|
+
</a>
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div class="method-description">
|
129
|
+
<p>
|
130
|
+
this is to make date objects more console-friendly
|
131
|
+
</p>
|
132
|
+
<p><a class="source-toggle" href="#"
|
133
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
134
|
+
<div class="method-source-code" id="M000003-source">
|
135
|
+
<pre>
|
136
|
+
<span class="ruby-comment cmt"># File lib/smart_month/extensions/date.rb, line 5</span>
|
137
|
+
5: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">inspect</span>
|
138
|
+
6: <span class="ruby-identifier">strftime</span>(<span class="ruby-value str">"%a, %d %b %Y"</span>)
|
139
|
+
7: <span class="ruby-keyword kw">end</span>
|
140
|
+
</pre>
|
141
|
+
</div>
|
142
|
+
</div>
|
143
|
+
</div>
|
144
|
+
|
145
|
+
<div id="method-M000005" class="method-detail">
|
146
|
+
<a name="M000005"></a>
|
147
|
+
|
148
|
+
<div class="method-heading">
|
149
|
+
<a href="#M000005" class="method-signature">
|
150
|
+
<span class="method-name">to_day</span><span class="method-args">()</span>
|
151
|
+
</a>
|
152
|
+
</div>
|
153
|
+
|
154
|
+
<div class="method-description">
|
155
|
+
<p>
|
156
|
+
allows a date to return the day of the week it currently is as a string
|
157
|
+
</p>
|
158
|
+
<p><a class="source-toggle" href="#"
|
159
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
160
|
+
<div class="method-source-code" id="M000005-source">
|
161
|
+
<pre>
|
162
|
+
<span class="ruby-comment cmt"># File lib/smart_month/extensions/date.rb, line 15</span>
|
163
|
+
15: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_day</span>
|
164
|
+
16: <span class="ruby-constant">Month</span><span class="ruby-operator">::</span><span class="ruby-constant">DAYS</span>[<span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">wday</span>]
|
165
|
+
17: <span class="ruby-keyword kw">end</span>
|
166
|
+
</pre>
|
167
|
+
</div>
|
168
|
+
</div>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
<div id="method-M000004" class="method-detail">
|
172
|
+
<a name="M000004"></a>
|
173
|
+
|
174
|
+
<div class="method-heading">
|
175
|
+
<a href="#M000004" class="method-signature">
|
176
|
+
<span class="method-name">to_i</span><span class="method-args">()</span>
|
177
|
+
</a>
|
178
|
+
</div>
|
179
|
+
|
180
|
+
<div class="method-description">
|
181
|
+
<p>
|
182
|
+
allows a date to retrun the current day its set to as an integer
|
183
|
+
</p>
|
184
|
+
<p><a class="source-toggle" href="#"
|
185
|
+
onclick="toggleCode('M000004-source');return false;">[Source]</a></p>
|
186
|
+
<div class="method-source-code" id="M000004-source">
|
187
|
+
<pre>
|
188
|
+
<span class="ruby-comment cmt"># File lib/smart_month/extensions/date.rb, line 10</span>
|
189
|
+
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">to_i</span>
|
190
|
+
11: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">day</span>.<span class="ruby-identifier">to_i</span>
|
191
|
+
12: <span class="ruby-keyword kw">end</span>
|
192
|
+
</pre>
|
193
|
+
</div>
|
194
|
+
</div>
|
195
|
+
</div>
|
196
|
+
|
197
|
+
|
198
|
+
</div>
|
199
|
+
|
200
|
+
|
201
|
+
</div>
|
202
|
+
|
203
|
+
|
204
|
+
<div id="validator-badges">
|
205
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
206
|
+
</div>
|
207
|
+
|
208
|
+
</body>
|
209
|
+
</html>
|
@@ -0,0 +1,189 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Class: Month</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Class</strong></td>
|
53
|
+
<td class="class-name-in-header">Month</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/month_rb.html">
|
59
|
+
lib/month.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
</td>
|
63
|
+
</tr>
|
64
|
+
|
65
|
+
<tr class="top-aligned-row">
|
66
|
+
<td><strong>Parent:</strong></td>
|
67
|
+
<td>
|
68
|
+
Object
|
69
|
+
</td>
|
70
|
+
</tr>
|
71
|
+
</table>
|
72
|
+
</div>
|
73
|
+
<!-- banner header -->
|
74
|
+
|
75
|
+
<div id="bodyContent">
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<div id="contextContent">
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</div>
|
84
|
+
|
85
|
+
<div id="method-list">
|
86
|
+
<h3 class="section-bar">Methods</h3>
|
87
|
+
|
88
|
+
<div class="name-list">
|
89
|
+
<a href="#M000001">new</a>
|
90
|
+
</div>
|
91
|
+
</div>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
|
96
|
+
<!-- if includes -->
|
97
|
+
<div id="includes">
|
98
|
+
<h3 class="section-bar">Included Modules</h3>
|
99
|
+
|
100
|
+
<div id="includes-list">
|
101
|
+
<span class="include-name"><a href="SmartMonth/Calculations.html">SmartMonth::Calculations</a></span>
|
102
|
+
<span class="include-name"><a href="SmartMonth/Collection.html">SmartMonth::Collection</a></span>
|
103
|
+
<span class="include-name"><a href="SmartMonth/Math.html">SmartMonth::Math</a></span>
|
104
|
+
<span class="include-name"><a href="SmartMonth/Util.html">SmartMonth::Util</a></span>
|
105
|
+
<span class="include-name"><a href="SmartMonth/Magic.html">SmartMonth::Magic</a></span>
|
106
|
+
</div>
|
107
|
+
</div>
|
108
|
+
|
109
|
+
<div id="section">
|
110
|
+
|
111
|
+
|
112
|
+
<div id="constants-list">
|
113
|
+
<h3 class="section-bar">Constants</h3>
|
114
|
+
|
115
|
+
<div class="name-list">
|
116
|
+
<table summary="Constants">
|
117
|
+
<tr class="top-aligned-row context-row">
|
118
|
+
<td class="context-item-name">NAMES</td>
|
119
|
+
<td>=</td>
|
120
|
+
<td class="context-item-value">Date::MONTHNAMES</td>
|
121
|
+
<td width="3em"> </td>
|
122
|
+
<td class="context-item-desc">
|
123
|
+
abstraction that returns an array of months.
|
124
|
+
|
125
|
+
</td>
|
126
|
+
</tr>
|
127
|
+
<tr class="top-aligned-row context-row">
|
128
|
+
<td class="context-item-name">DAYS</td>
|
129
|
+
<td>=</td>
|
130
|
+
<td class="context-item-value">Date::DAYNAMES</td>
|
131
|
+
<td width="3em"> </td>
|
132
|
+
<td class="context-item-desc">
|
133
|
+
abstraction that returns an array of day names.
|
134
|
+
|
135
|
+
</td>
|
136
|
+
</tr>
|
137
|
+
</table>
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
<!-- if method_list -->
|
147
|
+
<div id="methods">
|
148
|
+
<h3 class="section-bar">Public Class methods</h3>
|
149
|
+
|
150
|
+
<div id="method-M000001" class="method-detail">
|
151
|
+
<a name="M000001"></a>
|
152
|
+
|
153
|
+
<div class="method-heading">
|
154
|
+
<a href="#M000001" class="method-signature">
|
155
|
+
<span class="method-name">new</span><span class="method-args">(month = Time.now.mon, year = Time.now.year)</span>
|
156
|
+
</a>
|
157
|
+
</div>
|
158
|
+
|
159
|
+
<div class="method-description">
|
160
|
+
<p>
|
161
|
+
constructor, takes 2 optional arguments, if you don‘t provide them,
|
162
|
+
it will default to the current month and year.
|
163
|
+
</p>
|
164
|
+
<p><a class="source-toggle" href="#"
|
165
|
+
onclick="toggleCode('M000001-source');return false;">[Source]</a></p>
|
166
|
+
<div class="method-source-code" id="M000001-source">
|
167
|
+
<pre>
|
168
|
+
<span class="ruby-comment cmt"># File lib/month.rb, line 23</span>
|
169
|
+
23: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">month</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">mon</span>, <span class="ruby-identifier">year</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span>.<span class="ruby-identifier">year</span>)
|
170
|
+
24: <span class="ruby-ivar">@date</span> = <span class="ruby-constant">Date</span>.<span class="ruby-identifier">new</span>(<span class="ruby-identifier">year</span>,( <span class="ruby-identifier">month</span>.<span class="ruby-identifier">is_a?</span>(<span class="ruby-constant">Integer</span>) <span class="ruby-operator">?</span> <span class="ruby-identifier">month</span> <span class="ruby-operator">:</span> <span class="ruby-constant">Month</span><span class="ruby-operator">::</span><span class="ruby-constant">NAMES</span>.<span class="ruby-identifier">index</span>(<span class="ruby-identifier">month</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">capitalize</span>) ) ,<span class="ruby-value">1</span>)
|
171
|
+
25: <span class="ruby-keyword kw">end</span>
|
172
|
+
</pre>
|
173
|
+
</div>
|
174
|
+
</div>
|
175
|
+
</div>
|
176
|
+
|
177
|
+
|
178
|
+
</div>
|
179
|
+
|
180
|
+
|
181
|
+
</div>
|
182
|
+
|
183
|
+
|
184
|
+
<div id="validator-badges">
|
185
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
</body>
|
189
|
+
</html>
|
@@ -0,0 +1,136 @@
|
|
1
|
+
<?xml version="1.0" encoding="iso-8859-1"?>
|
2
|
+
<!DOCTYPE html
|
3
|
+
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
|
4
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
5
|
+
|
6
|
+
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
7
|
+
<head>
|
8
|
+
<title>Module: SmartMonth</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<meta http-equiv="Content-Script-Type" content="text/javascript" />
|
11
|
+
<link rel="stylesheet" href=".././rdoc-style.css" type="text/css" media="screen" />
|
12
|
+
<script type="text/javascript">
|
13
|
+
// <![CDATA[
|
14
|
+
|
15
|
+
function popupCode( url ) {
|
16
|
+
window.open(url, "Code", "resizable=yes,scrollbars=yes,toolbar=no,status=no,height=150,width=400")
|
17
|
+
}
|
18
|
+
|
19
|
+
function toggleCode( id ) {
|
20
|
+
if ( document.getElementById )
|
21
|
+
elem = document.getElementById( id );
|
22
|
+
else if ( document.all )
|
23
|
+
elem = eval( "document.all." + id );
|
24
|
+
else
|
25
|
+
return false;
|
26
|
+
|
27
|
+
elemStyle = elem.style;
|
28
|
+
|
29
|
+
if ( elemStyle.display != "block" ) {
|
30
|
+
elemStyle.display = "block"
|
31
|
+
} else {
|
32
|
+
elemStyle.display = "none"
|
33
|
+
}
|
34
|
+
|
35
|
+
return true;
|
36
|
+
}
|
37
|
+
|
38
|
+
// Make codeblocks hidden by default
|
39
|
+
document.writeln( "<style type=\"text/css\">div.method-source-code { display: none }</style>" )
|
40
|
+
|
41
|
+
// ]]>
|
42
|
+
</script>
|
43
|
+
|
44
|
+
</head>
|
45
|
+
<body>
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
<div id="classHeader">
|
50
|
+
<table class="header-table">
|
51
|
+
<tr class="top-aligned-row">
|
52
|
+
<td><strong>Module</strong></td>
|
53
|
+
<td class="class-name-in-header">SmartMonth</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/smart_month/rulesets_rb.html">
|
59
|
+
lib/smart_month/rulesets.rb
|
60
|
+
</a>
|
61
|
+
<br />
|
62
|
+
<a href="../files/lib/smart_month/magic_rb.html">
|
63
|
+
lib/smart_month/magic.rb
|
64
|
+
</a>
|
65
|
+
<br />
|
66
|
+
<a href="../files/lib/smart_month/math_rb.html">
|
67
|
+
lib/smart_month/math.rb
|
68
|
+
</a>
|
69
|
+
<br />
|
70
|
+
<a href="../files/lib/smart_month/collection_rb.html">
|
71
|
+
lib/smart_month/collection.rb
|
72
|
+
</a>
|
73
|
+
<br />
|
74
|
+
<a href="../files/lib/smart_month/calculations_rb.html">
|
75
|
+
lib/smart_month/calculations.rb
|
76
|
+
</a>
|
77
|
+
<br />
|
78
|
+
<a href="../files/lib/smart_month/util_rb.html">
|
79
|
+
lib/smart_month/util.rb
|
80
|
+
</a>
|
81
|
+
<br />
|
82
|
+
</td>
|
83
|
+
</tr>
|
84
|
+
|
85
|
+
</table>
|
86
|
+
</div>
|
87
|
+
<!-- banner header -->
|
88
|
+
|
89
|
+
<div id="bodyContent">
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
<div id="contextContent">
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
</div>
|
98
|
+
|
99
|
+
|
100
|
+
</div>
|
101
|
+
|
102
|
+
|
103
|
+
<!-- if includes -->
|
104
|
+
|
105
|
+
<div id="section">
|
106
|
+
|
107
|
+
<div id="class-list">
|
108
|
+
<h3 class="section-bar">Classes and Modules</h3>
|
109
|
+
|
110
|
+
Module <a href="SmartMonth/Calculations.html" class="link">SmartMonth::Calculations</a><br />
|
111
|
+
Module <a href="SmartMonth/Collection.html" class="link">SmartMonth::Collection</a><br />
|
112
|
+
Module <a href="SmartMonth/Magic.html" class="link">SmartMonth::Magic</a><br />
|
113
|
+
Module <a href="SmartMonth/Math.html" class="link">SmartMonth::Math</a><br />
|
114
|
+
Module <a href="SmartMonth/Util.html" class="link">SmartMonth::Util</a><br />
|
115
|
+
Class <a href="SmartMonth/Rulesets.html" class="link">SmartMonth::Rulesets</a><br />
|
116
|
+
|
117
|
+
</div>
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<!-- if method_list -->
|
126
|
+
|
127
|
+
|
128
|
+
</div>
|
129
|
+
|
130
|
+
|
131
|
+
<div id="validator-badges">
|
132
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
133
|
+
</div>
|
134
|
+
|
135
|
+
</body>
|
136
|
+
</html>
|