icalendar 0.96.2 → 0.96.3
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/docs/api/classes/HashAttrs.html +33 -20
- data/docs/api/classes/Icalendar/Component.html +1 -1
- data/docs/api/classes/Icalendar/Event.html +1 -9
- data/docs/api/classes/Icalendar/Journal.html +1 -6
- data/docs/api/classes/Icalendar/Todo.html +1 -6
- data/docs/api/created.rid +1 -1
- data/docs/api/files/lib/hash_attrs_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/event_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/journal_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component/todo_rb.html +1 -1
- data/docs/api/files/lib/icalendar/component_rb.html +1 -1
- data/lib/hash_attrs.rb +18 -13
- data/lib/icalendar/component.rb +1 -1
- data/lib/icalendar/component/event.rb +1 -1
- data/lib/icalendar/component/journal.rb +1 -1
- data/lib/icalendar/component/todo.rb +1 -1
- data/test/calendar_test.rb +1 -0
- data/test/life.ics +1 -0
- metadata +2 -2
data/Rakefile
CHANGED
@@ -115,7 +115,7 @@ A module which adds some generators for hash based accessors.
|
|
115
115
|
|
116
116
|
<div class="method-heading">
|
117
117
|
<a href="#M000053" class="method-signature">
|
118
|
-
<span class="method-name">hash_accessor</span><span class="method-args">(hash, syms)</span>
|
118
|
+
<span class="method-name">hash_accessor</span><span class="method-args">(hash, *syms)</span>
|
119
119
|
</a>
|
120
120
|
</div>
|
121
121
|
|
@@ -124,11 +124,11 @@ A module which adds some generators for hash based accessors.
|
|
124
124
|
onclick="toggleCode('M000053-source');return false;">[Source]</a></p>
|
125
125
|
<div class="method-source-code" id="M000053-source">
|
126
126
|
<pre>
|
127
|
-
<span class="ruby-comment cmt"># File lib/hash_attrs.rb, line
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
127
|
+
<span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 29</span>
|
128
|
+
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_accessor</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
|
129
|
+
30: <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">syms</span>)
|
130
|
+
31: <span class="ruby-identifier">hash_writer</span>(<span class="ruby-identifier">hash</span>, <span class="ruby-identifier">syms</span>)
|
131
|
+
32: <span class="ruby-keyword kw">end</span>
|
132
132
|
</pre>
|
133
133
|
</div>
|
134
134
|
</div>
|
@@ -139,7 +139,7 @@ A module which adds some generators for hash based accessors.
|
|
139
139
|
|
140
140
|
<div class="method-heading">
|
141
141
|
<a href="#M000051" class="method-signature">
|
142
|
-
<span class="method-name">hash_reader</span><span class="method-args">(
|
142
|
+
<span class="method-name">hash_reader</span><span class="method-args">(hash_sym, syms)</span>
|
143
143
|
</a>
|
144
144
|
</div>
|
145
145
|
|
@@ -148,12 +148,18 @@ A module which adds some generators for hash based accessors.
|
|
148
148
|
onclick="toggleCode('M000051-source');return false;">[Source]</a></p>
|
149
149
|
<div class="method-source-code" id="M000051-source">
|
150
150
|
<pre>
|
151
|
-
|
152
|
-
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">
|
153
|
-
5: <span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
154
|
-
6: <span class="ruby-identifier">
|
155
|
-
7:
|
156
|
-
8:
|
151
|
+
<span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 4</span>
|
152
|
+
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_reader</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
|
153
|
+
5: <span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
154
|
+
6: <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
|
155
|
+
7: <span class="ruby-identifier">func</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span>
|
156
|
+
8: <span class="ruby-identifier">hash</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">hash_sym</span>)
|
157
|
+
9: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>]
|
158
|
+
10: <span class="ruby-keyword kw">end</span>
|
159
|
+
11:
|
160
|
+
12: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">id</span>, <span class="ruby-identifier">func</span>)
|
161
|
+
13: <span class="ruby-keyword kw">end</span>
|
162
|
+
14: <span class="ruby-keyword kw">end</span>
|
157
163
|
</pre>
|
158
164
|
</div>
|
159
165
|
</div>
|
@@ -164,7 +170,7 @@ A module which adds some generators for hash based accessors.
|
|
164
170
|
|
165
171
|
<div class="method-heading">
|
166
172
|
<a href="#M000052" class="method-signature">
|
167
|
-
<span class="method-name">hash_writer</span><span class="method-args">(
|
173
|
+
<span class="method-name">hash_writer</span><span class="method-args">(hash_sym, syms)</span>
|
168
174
|
</a>
|
169
175
|
</div>
|
170
176
|
|
@@ -173,12 +179,19 @@ A module which adds some generators for hash based accessors.
|
|
173
179
|
onclick="toggleCode('M000052-source');return false;">[Source]</a></p>
|
174
180
|
<div class="method-source-code" id="M000052-source">
|
175
181
|
<pre>
|
176
|
-
<span class="ruby-comment cmt"># File lib/hash_attrs.rb, line
|
177
|
-
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
+
<span class="ruby-comment cmt"># File lib/hash_attrs.rb, line 16</span>
|
183
|
+
16: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">hash_writer</span>(<span class="ruby-identifier">hash_sym</span>, <span class="ruby-identifier">syms</span>)
|
184
|
+
17: <span class="ruby-identifier">syms</span>.<span class="ruby-identifier">each</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">id</span><span class="ruby-operator">|</span>
|
185
|
+
18: <span class="ruby-identifier">id</span> = <span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">downcase</span>
|
186
|
+
19:
|
187
|
+
20: <span class="ruby-identifier">func</span> = <span class="ruby-constant">Proc</span>.<span class="ruby-identifier">new</span> <span class="ruby-keyword kw">do</span> <span class="ruby-operator">|</span><span class="ruby-identifier">val</span><span class="ruby-operator">|</span>
|
188
|
+
21: <span class="ruby-identifier">hash</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-identifier">hash_sym</span>)
|
189
|
+
22: <span class="ruby-identifier">hash</span>[<span class="ruby-identifier">id</span>.<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">val</span>
|
190
|
+
23: <span class="ruby-keyword kw">end</span>
|
191
|
+
24:
|
192
|
+
25: <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">send</span>(<span class="ruby-identifier">:define_method</span>, <span class="ruby-identifier">id</span><span class="ruby-operator">+</span><span class="ruby-value str">'='</span>, <span class="ruby-identifier">func</span>)
|
193
|
+
26: <span class="ruby-keyword kw">end</span>
|
194
|
+
27: <span class="ruby-keyword kw">end</span>
|
182
195
|
</pre>
|
183
196
|
</div>
|
184
197
|
</div>
|
@@ -209,7 +209,7 @@ Make it protected so we can monitor usage…
|
|
209
209
|
<pre>
|
210
210
|
<span class="ruby-comment cmt"># File lib/icalendar/component.rb, line 129</span>
|
211
211
|
129: <span class="ruby-keyword kw">def</span> <span class="ruby-constant">Component</span>.<span class="ruby-identifier">ical_component</span>(<span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>)
|
212
|
-
130: <span class="ruby-identifier">hash_accessor</span> <span class="ruby-identifier"
|
212
|
+
130: <span class="ruby-identifier">hash_accessor</span> <span class="ruby-identifier">:@components</span>, <span class="ruby-operator">*</span><span class="ruby-identifier">syms</span>
|
213
213
|
131: <span class="ruby-keyword kw">end</span>
|
214
214
|
</pre>
|
215
215
|
</div>
|
@@ -348,15 +348,7 @@ Access classification (PUBLIC, PRIVATE, CONFIDENTIAL…)
|
|
348
348
|
</td>
|
349
349
|
</tr>
|
350
350
|
<tr class="top-aligned-row context-row">
|
351
|
-
<td class="context-item-name">
|
352
|
-
<td class="context-item-value"> </td>
|
353
|
-
<td class="context-item-desc">
|
354
|
-
<a href="../Date.html">Date</a> & time this item was last modified
|
355
|
-
|
356
|
-
</td>
|
357
|
-
</tr>
|
358
|
-
<tr class="top-aligned-row context-row">
|
359
|
-
<td class="context-item-name">last_modification</td>
|
351
|
+
<td class="context-item-name">last_modified</td>
|
360
352
|
<td class="context-item-value"> </td>
|
361
353
|
<td class="context-item-desc">
|
362
354
|
<a href="../Date.html">Date</a> & time this item was last modified
|
@@ -267,12 +267,7 @@ Single properties
|
|
267
267
|
</td>
|
268
268
|
</tr>
|
269
269
|
<tr class="top-aligned-row context-row">
|
270
|
-
<td class="context-item-name">
|
271
|
-
<td class="context-item-value"> </td>
|
272
|
-
<td class="context-item-desc"></td>
|
273
|
-
</tr>
|
274
|
-
<tr class="top-aligned-row context-row">
|
275
|
-
<td class="context-item-name">last_modification</td>
|
270
|
+
<td class="context-item-name">last_modified</td>
|
276
271
|
<td class="context-item-value"> </td>
|
277
272
|
<td class="context-item-desc"></td>
|
278
273
|
</tr>
|
@@ -289,12 +289,7 @@ Single properties
|
|
289
289
|
</td>
|
290
290
|
</tr>
|
291
291
|
<tr class="top-aligned-row context-row">
|
292
|
-
<td class="context-item-name">
|
293
|
-
<td class="context-item-value"> </td>
|
294
|
-
<td class="context-item-desc"></td>
|
295
|
-
</tr>
|
296
|
-
<tr class="top-aligned-row context-row">
|
297
|
-
<td class="context-item-name">last_modification</td>
|
292
|
+
<td class="context-item-name">last_modified</td>
|
298
293
|
<td class="context-item-value"> </td>
|
299
294
|
<td class="context-item-desc"></td>
|
300
295
|
</tr>
|
data/docs/api/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Tue Nov 29 16:10:39 CET 2005
|
data/lib/hash_attrs.rb
CHANGED
@@ -1,27 +1,32 @@
|
|
1
1
|
# A module which adds some generators for hash based accessors.
|
2
2
|
module HashAttrs
|
3
3
|
|
4
|
-
def hash_reader(
|
4
|
+
def hash_reader(hash_sym, syms)
|
5
5
|
syms.each do |id|
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
id = id.to_s.downcase
|
7
|
+
func = Proc.new do
|
8
|
+
hash = instance_variable_get(hash_sym)
|
9
|
+
hash[id.to_sym]
|
10
|
+
end
|
11
|
+
|
12
|
+
self.send(:define_method, id, func)
|
11
13
|
end
|
12
14
|
end
|
13
15
|
|
14
|
-
def hash_writer(
|
16
|
+
def hash_writer(hash_sym, syms)
|
15
17
|
syms.each do |id|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
18
|
+
id = id.to_s.downcase
|
19
|
+
|
20
|
+
func = Proc.new do |val|
|
21
|
+
hash = instance_variable_get(hash_sym)
|
22
|
+
hash[id.to_sym] = val
|
23
|
+
end
|
24
|
+
|
25
|
+
self.send(:define_method, id+'=', func)
|
21
26
|
end
|
22
27
|
end
|
23
28
|
|
24
|
-
def hash_accessor(hash, syms)
|
29
|
+
def hash_accessor(hash, *syms)
|
25
30
|
hash_reader(hash, syms)
|
26
31
|
hash_writer(hash, syms)
|
27
32
|
end
|
data/lib/icalendar/component.rb
CHANGED
@@ -24,7 +24,7 @@ module Icalendar
|
|
24
24
|
ical_property :created
|
25
25
|
ical_property :description
|
26
26
|
ical_property :dtstart, :start
|
27
|
-
ical_property :
|
27
|
+
ical_property :last_modified
|
28
28
|
ical_property :organizer
|
29
29
|
ical_property :dtstamp, :timestamp
|
30
30
|
ical_property :seq, :sequence
|
@@ -22,7 +22,7 @@ module Icalendar
|
|
22
22
|
ical_property :dtstamp, :timestamp
|
23
23
|
ical_property :dtstart, :start
|
24
24
|
ical_property :geo
|
25
|
-
ical_property :
|
25
|
+
ical_property :last_modified
|
26
26
|
ical_property :location
|
27
27
|
ical_property :organizer
|
28
28
|
ical_property :percent
|
data/test/calendar_test.rb
CHANGED
data/test/life.ics
CHANGED
@@ -27,6 +27,7 @@ UID:bsuidfortestabc123
|
|
27
27
|
ORGANIZER:mailto:joebob@random.net
|
28
28
|
ATTACH:http://bush.sucks.org/impeach/him.rhtml
|
29
29
|
ATTACH:http://corporations-dominate.existence.net/why.rhtml
|
30
|
+
LAST-MODIFIED:20050825T194346Z
|
30
31
|
SUMMARY:This is a really long summary
|
31
32
|
to test the method of unfolding lines
|
32
33
|
so I'm just going to ma
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
|
|
3
3
|
specification_version: 1
|
4
4
|
name: icalendar
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.96.
|
7
|
-
date: 2005-
|
6
|
+
version: 0.96.3
|
7
|
+
date: 2005-11-29 00:00:00 +01:00
|
8
8
|
summary: A ruby implementation of the iCalendar specification (RFC-2445).
|
9
9
|
require_paths:
|
10
10
|
- lib
|