copyright 0.1.0 → 0.1.1
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/.yardoc/checksums +1 -1
- data/.yardoc/objects/CopyrightHelper.dat +0 -0
- data/.yardoc/objects/{CopyrightYears → CopyrightHelper}/copyright_years_i.dat +0 -0
- data/.yardoc/objects/root.dat +0 -0
- data/README.md +1 -1
- data/VERSION +1 -1
- data/copyright.gemspec +5 -4
- data/doc/CopyrightHelper.html +234 -0
- data/doc/CopyrightYears.html +1 -1
- data/doc/_index.html +2 -2
- data/doc/class_list.html +1 -1
- data/doc/file.README.html +1 -1
- data/doc/index.html +1 -1
- data/doc/method_list.html +2 -2
- data/doc/top-level-namespace.html +2 -2
- data/init.rb +1 -1
- data/lib/{copyright.rb → copyright_helper.rb} +1 -1
- data/test/test_copyright.rb +1 -1
- data/test/test_helper.rb +1 -1
- metadata +5 -4
- data/.yardoc/objects/CopyrightYears.dat +0 -0
data/.yardoc/checksums
CHANGED
Binary file
|
Binary file
|
data/.yardoc/objects/root.dat
CHANGED
Binary file
|
data/README.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/copyright.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{copyright}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Takaaki Kato"]
|
@@ -20,8 +20,8 @@ Gem::Specification.new do |s|
|
|
20
20
|
".document",
|
21
21
|
".gitignore",
|
22
22
|
".yardoc/checksums",
|
23
|
-
".yardoc/objects/
|
24
|
-
".yardoc/objects/
|
23
|
+
".yardoc/objects/CopyrightHelper.dat",
|
24
|
+
".yardoc/objects/CopyrightHelper/copyright_years_i.dat",
|
25
25
|
".yardoc/objects/root.dat",
|
26
26
|
".yardoc/proxy_types",
|
27
27
|
"LICENSE",
|
@@ -29,6 +29,7 @@ Gem::Specification.new do |s|
|
|
29
29
|
"Rakefile",
|
30
30
|
"VERSION",
|
31
31
|
"copyright.gemspec",
|
32
|
+
"doc/CopyrightHelper.html",
|
32
33
|
"doc/CopyrightYears.html",
|
33
34
|
"doc/_index.html",
|
34
35
|
"doc/class_list.html",
|
@@ -44,7 +45,7 @@ Gem::Specification.new do |s|
|
|
44
45
|
"doc/method_list.html",
|
45
46
|
"doc/top-level-namespace.html",
|
46
47
|
"init.rb",
|
47
|
-
"lib/
|
48
|
+
"lib/copyright_helper.rb",
|
48
49
|
"test/test_copyright.rb",
|
49
50
|
"test/test_helper.rb"
|
50
51
|
]
|
@@ -0,0 +1,234 @@
|
|
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 name="Content-Type" content="text/html; charset=UTF-8" />
|
6
|
+
<title>Module: CopyrightHelper</title>
|
7
|
+
<link rel="stylesheet" href="css/style.css" type="text/css" media="screen" charset="utf-8" />
|
8
|
+
<link rel="stylesheet" href="css/common.css" type="text/css" media="screen" charset="utf-8" />
|
9
|
+
|
10
|
+
<script type="text/javascript" charset="utf-8">
|
11
|
+
relpath = '';
|
12
|
+
if (relpath != '') relpath += '/';
|
13
|
+
</script>
|
14
|
+
<script type="text/javascript" charset="utf-8" src="js/jquery.js"></script>
|
15
|
+
<script type="text/javascript" charset="utf-8" src="js/app.js"></script>
|
16
|
+
|
17
|
+
</head>
|
18
|
+
<body>
|
19
|
+
<div id="header">
|
20
|
+
<div id="menu">
|
21
|
+
|
22
|
+
<a href="_index.html">Index (C)</a> »
|
23
|
+
|
24
|
+
|
25
|
+
<span class="title">CopyrightHelper</span>
|
26
|
+
|
27
|
+
</div>
|
28
|
+
|
29
|
+
<div id="search">
|
30
|
+
<a id="class_list_link" href="#">Namespace List</a>
|
31
|
+
<a id="method_list_link" href="#">Method List</a>
|
32
|
+
<a id ="file_list_link" href="#">File List</a>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div class="clear"></div>
|
36
|
+
</div>
|
37
|
+
|
38
|
+
<iframe id="search_frame"></iframe>
|
39
|
+
|
40
|
+
<div id="content"><h1>Module: CopyrightHelper
|
41
|
+
|
42
|
+
|
43
|
+
</h1>
|
44
|
+
|
45
|
+
<dl class="box">
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
<dt class="r1 last">Defined in:</dt>
|
54
|
+
<dd class="r1 last">lib/copyright_helper.rb</dd>
|
55
|
+
|
56
|
+
</dl>
|
57
|
+
<div class="clear"></div>
|
58
|
+
|
59
|
+
<h2>Overview</h2><div class="docstring">
|
60
|
+
<div class="discussion">
|
61
|
+
<p>
|
62
|
+
Adds a method for copyright period
|
63
|
+
</p>
|
64
|
+
|
65
|
+
|
66
|
+
</div>
|
67
|
+
</div>
|
68
|
+
<div class="tags">
|
69
|
+
<h3>Author:</h3>
|
70
|
+
<ul class="author">
|
71
|
+
|
72
|
+
<li>
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
Takaaki Kato <takaaki.kato@gmail.com>
|
80
|
+
|
81
|
+
|
82
|
+
|
83
|
+
</li>
|
84
|
+
|
85
|
+
</ul>
|
86
|
+
|
87
|
+
</div>
|
88
|
+
|
89
|
+
|
90
|
+
<h2>Instance Method Summary</h2>
|
91
|
+
|
92
|
+
<ul class="summary">
|
93
|
+
|
94
|
+
<li class="public ">
|
95
|
+
<span class="summary_signature">
|
96
|
+
|
97
|
+
<a href="#copyright_years-instance_method" title="#copyright_years (instance method)">- (Object) <strong>copyright_years</strong>(since) </a>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
</span>
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
|
109
|
+
<span class="summary_desc">
|
110
|
+
Returns copyright period in years.
|
111
|
+
|
112
|
+
</span>
|
113
|
+
|
114
|
+
</li>
|
115
|
+
|
116
|
+
|
117
|
+
</ul>
|
118
|
+
|
119
|
+
|
120
|
+
<div id="instance_method_details" class="method_details_list">
|
121
|
+
<h2>Instance Method Details</h2>
|
122
|
+
|
123
|
+
|
124
|
+
<div class="method_details first">
|
125
|
+
<p class="signature first" id="copyright_years-instance_method">
|
126
|
+
|
127
|
+
- (<tt>Object</tt>) <strong>copyright_years</strong>(since)
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
</p><div class="docstring">
|
132
|
+
<div class="discussion">
|
133
|
+
<p>
|
134
|
+
Returns copyright period in years
|
135
|
+
</p>
|
136
|
+
|
137
|
+
|
138
|
+
</div>
|
139
|
+
</div>
|
140
|
+
<div class="tags">
|
141
|
+
|
142
|
+
<div class="examples">
|
143
|
+
<h3>Examples:</h3>
|
144
|
+
|
145
|
+
<h4>
|
146
|
+
When the argument is the year of now
|
147
|
+
|
148
|
+
</h4>
|
149
|
+
<pre class="example code"> <span class='copyright_years identifier id'>copyright_years</span><span class='lparen token'>(</span><span class='integer val'>2009</span><span class='rparen token'>)</span> <span class='comment val'>#=> "2009"</span>
|
150
|
+
</pre>
|
151
|
+
|
152
|
+
<h4>
|
153
|
+
When the argument if before of this year
|
154
|
+
|
155
|
+
</h4>
|
156
|
+
<pre class="example code"> <span class='copyright_years identifier id'>copyright_years</span><span class='lparen token'>(</span><span class='integer val'>1997</span><span class='rparen token'>)</span> <span class='comment val'>#=> "1997 - 2009"</span>
|
157
|
+
</pre>
|
158
|
+
|
159
|
+
</div>
|
160
|
+
<h3>Parameters:</h3>
|
161
|
+
<ul class="param">
|
162
|
+
|
163
|
+
<li>
|
164
|
+
|
165
|
+
<span class='type'>(<tt>#is_a?(Integer)</tt>)</span>
|
166
|
+
|
167
|
+
|
168
|
+
<span class='name'></span>
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
</li>
|
173
|
+
|
174
|
+
</ul>
|
175
|
+
<h3>Raises:</h3>
|
176
|
+
<ul class="raise">
|
177
|
+
|
178
|
+
<li>
|
179
|
+
|
180
|
+
<span class='type'>(<tt>ArgumentError</tt>)</span>
|
181
|
+
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
</li>
|
186
|
+
|
187
|
+
</ul>
|
188
|
+
|
189
|
+
</div><table class="source_code">
|
190
|
+
<tr>
|
191
|
+
<td>
|
192
|
+
<pre class="lines">
|
193
|
+
|
194
|
+
|
195
|
+
12
|
196
|
+
13
|
197
|
+
14
|
198
|
+
15
|
199
|
+
16
|
200
|
+
17
|
201
|
+
18
|
202
|
+
19
|
203
|
+
20</pre>
|
204
|
+
</td>
|
205
|
+
<td>
|
206
|
+
<pre class="code"><span class="info file"># File 'lib/copyright_helper.rb', line 12</span>
|
207
|
+
|
208
|
+
<span class='def def kw'>def</span> <span class='copyright_years identifier id'>copyright_years</span><span class='lparen token'>(</span><span class='since identifier id'>since</span><span class='rparen token'>)</span>
|
209
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"Argument should be a number"</span> <span class='unless unless_mod kw'>unless</span> <span class='since identifier id'>since</span><span class='dot token'>.</span><span class='is_a? fid id'>is_a?</span><span class='lparen token'>(</span><span class='Integer constant id'>Integer</span><span class='rparen token'>)</span>
|
210
|
+
<span class='raise identifier id'>raise</span> <span class='ArgumentError constant id'>ArgumentError</span><span class='comma token'>,</span> <span class='string val'>"since should not be a future"</span> <span class='if if_mod kw'>if</span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='civil identifier id'>civil</span><span class='lparen token'>(</span><span class='since identifier id'>since</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='year identifier id'>year</span> <span class='gt op'>></span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='today identifier id'>today</span><span class='dot token'>.</span><span class='year identifier id'>year</span>
|
211
|
+
<span class='if if kw'>if</span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='civil identifier id'>civil</span><span class='lparen token'>(</span><span class='since identifier id'>since</span><span class='rparen token'>)</span><span class='dot token'>.</span><span class='year identifier id'>year</span> <span class='eq op'>==</span> <span class='Date constant id'>Date</span><span class='dot token'>.</span><span class='today identifier id'>today</span><span class='dot token'>.</span><span class='year identifier id'>year</span>
|
212
|
+
<span class='since identifier id'>since</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span>
|
213
|
+
<span class='else else kw'>else</span>
|
214
|
+
<span class='dstring node'>"#{since} - #{Date.today.year}"</span>
|
215
|
+
<span class='end end kw'>end</span>
|
216
|
+
<span class='end end kw'>end</span>
|
217
|
+
</pre>
|
218
|
+
</td>
|
219
|
+
</tr>
|
220
|
+
</table>
|
221
|
+
</div>
|
222
|
+
|
223
|
+
</div>
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
<div id="footer">
|
228
|
+
Generated on Mon Dec 28 06:46:33 2009 by
|
229
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
230
|
+
0.5.2 (ruby-1.8.7).
|
231
|
+
</div>
|
232
|
+
|
233
|
+
</body>
|
234
|
+
</html>
|
data/doc/CopyrightYears.html
CHANGED
@@ -225,7 +225,7 @@ When the argument if before of this year
|
|
225
225
|
</div>
|
226
226
|
|
227
227
|
<div id="footer">
|
228
|
-
Generated on Mon Dec 28 05:
|
228
|
+
Generated on Mon Dec 28 05:56:21 2009 by
|
229
229
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
230
230
|
0.5.2 (ruby-1.8.7).
|
231
231
|
</div>
|
data/doc/_index.html
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
<ul>
|
67
67
|
|
68
68
|
<li>
|
69
|
-
<a href="
|
69
|
+
<a href="CopyrightHelper.html" title="CopyrightHelper">CopyrightHelper</a>
|
70
70
|
|
71
71
|
</li>
|
72
72
|
|
@@ -79,7 +79,7 @@
|
|
79
79
|
</div></div>
|
80
80
|
|
81
81
|
<div id="footer">
|
82
|
-
Generated on Mon Dec 28
|
82
|
+
Generated on Mon Dec 28 06:46:33 2009 by
|
83
83
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
84
84
|
0.5.2 (ruby-1.8.7).
|
85
85
|
</div>
|
data/doc/class_list.html
CHANGED
data/doc/file.README.html
CHANGED
@@ -57,7 +57,7 @@
|
|
57
57
|
<p>Copyright (c) 2009 Takaaki Kato. See LICENSE for details.</p></div></div>
|
58
58
|
|
59
59
|
<div id="footer">
|
60
|
-
Generated on Mon Dec 28
|
60
|
+
Generated on Mon Dec 28 06:46:33 2009 by
|
61
61
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
62
62
|
0.5.2 (ruby-1.8.7).
|
63
63
|
</div>
|
data/doc/index.html
CHANGED
@@ -57,7 +57,7 @@
|
|
57
57
|
<p>Copyright (c) 2009 Takaaki Kato. See LICENSE for details.</p></div></div>
|
58
58
|
|
59
59
|
<div id="footer">
|
60
|
-
Generated on Mon Dec 28
|
60
|
+
Generated on Mon Dec 28 06:46:33 2009 by
|
61
61
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
62
62
|
0.5.2 (ruby-1.8.7).
|
63
63
|
</div>
|
data/doc/method_list.html
CHANGED
@@ -18,9 +18,9 @@
|
|
18
18
|
|
19
19
|
<li class="r1 ">
|
20
20
|
|
21
|
-
<a href="
|
21
|
+
<a href="CopyrightHelper.html#copyright_years-instance_method" title="#copyright_years">#copyright_years</a>
|
22
22
|
|
23
|
-
<small>(
|
23
|
+
<small>(CopyrightHelper)</small>
|
24
24
|
|
25
25
|
|
26
26
|
|
@@ -57,7 +57,7 @@
|
|
57
57
|
<p class="children">
|
58
58
|
|
59
59
|
|
60
|
-
<strong class="modules">Modules:</strong> <a href="
|
60
|
+
<strong class="modules">Modules:</strong> <a href="CopyrightHelper.html" title="CopyrightHelper">CopyrightHelper</a>
|
61
61
|
|
62
62
|
|
63
63
|
|
@@ -70,7 +70,7 @@
|
|
70
70
|
</div>
|
71
71
|
|
72
72
|
<div id="footer">
|
73
|
-
Generated on Mon Dec 28
|
73
|
+
Generated on Mon Dec 28 06:46:33 2009 by
|
74
74
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool">yard</a>
|
75
75
|
0.5.2 (ruby-1.8.7).
|
76
76
|
</div>
|
data/init.rb
CHANGED
@@ -1 +1 @@
|
|
1
|
-
ActionController::Base.helper(
|
1
|
+
ActionController::Base.helper(CopyrightHelper)
|
data/test/test_copyright.rb
CHANGED
data/test/test_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copyright
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Takaaki Kato
|
@@ -45,8 +45,8 @@ files:
|
|
45
45
|
- .document
|
46
46
|
- .gitignore
|
47
47
|
- .yardoc/checksums
|
48
|
-
- .yardoc/objects/
|
49
|
-
- .yardoc/objects/
|
48
|
+
- .yardoc/objects/CopyrightHelper.dat
|
49
|
+
- .yardoc/objects/CopyrightHelper/copyright_years_i.dat
|
50
50
|
- .yardoc/objects/root.dat
|
51
51
|
- .yardoc/proxy_types
|
52
52
|
- LICENSE
|
@@ -54,6 +54,7 @@ files:
|
|
54
54
|
- Rakefile
|
55
55
|
- VERSION
|
56
56
|
- copyright.gemspec
|
57
|
+
- doc/CopyrightHelper.html
|
57
58
|
- doc/CopyrightYears.html
|
58
59
|
- doc/_index.html
|
59
60
|
- doc/class_list.html
|
@@ -69,7 +70,7 @@ files:
|
|
69
70
|
- doc/method_list.html
|
70
71
|
- doc/top-level-namespace.html
|
71
72
|
- init.rb
|
72
|
-
- lib/
|
73
|
+
- lib/copyright_helper.rb
|
73
74
|
- test/test_copyright.rb
|
74
75
|
- test/test_helper.rb
|
75
76
|
has_rdoc: true
|
Binary file
|