timeline_setter 0.1.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/.document +4 -0
- data/LICENSE.txt +18 -0
- data/README +15 -0
- data/Rakefile +98 -0
- data/bin/timeline-setter +9 -0
- data/doc/doc.markdown +253 -0
- data/doc/doc_wrapper.erb +87 -0
- data/doc/docco.css +186 -0
- data/doc/timeline-setter.html +592 -0
- data/doc/todo.markdown +28 -0
- data/doc/twitter-demo.html +122 -0
- data/documentation/TimelineSetter/CLI.html +575 -0
- data/documentation/TimelineSetter/Parser.html +285 -0
- data/documentation/TimelineSetter/Timeline.html +513 -0
- data/documentation/TimelineSetter/Util.html +246 -0
- data/documentation/TimelineSetter.html +112 -0
- data/documentation/_index.html +132 -0
- data/documentation/class_list.html +36 -0
- data/documentation/css/common.css +1 -0
- data/documentation/css/full_list.css +53 -0
- data/documentation/css/style.css +318 -0
- data/documentation/file.README.html +70 -0
- data/documentation/file_list.html +38 -0
- data/documentation/frames.html +13 -0
- data/documentation/index.html +70 -0
- data/documentation/js/app.js +203 -0
- data/documentation/js/full_list.js +149 -0
- data/documentation/js/jquery.js +16 -0
- data/documentation/method_list.html +155 -0
- data/documentation/top-level-namespace.html +88 -0
- data/index.html +397 -0
- data/lib/timeline_setter/cli.rb +85 -0
- data/lib/timeline_setter/parser.rb +28 -0
- data/lib/timeline_setter/timeline.rb +44 -0
- data/lib/timeline_setter/version.rb +3 -0
- data/lib/timeline_setter.rb +22 -0
- data/public/javascripts/timeline-setter.js +822 -0
- data/public/javascripts/vendor/jquery-min.js +16 -0
- data/public/javascripts/vendor/underscore-min.js +26 -0
- data/public/stylesheets/timeline-setter.css +396 -0
- data/spec/spec_helper.rb +10 -0
- data/spec/test_data.csv +4 -0
- data/spec/timeline_setter_spec.rb +85 -0
- data/templates/timeline-markup.erb +61 -0
- data/templates/timeline-min.erb +1 -0
- data/templates/timeline.erb +12 -0
- data/timeline_setter.gemspec +104 -0
- metadata +189 -0
@@ -0,0 +1,285 @@
|
|
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>Class: TimelineSetter::Parser</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
|
+
<script type="text/javascript" charset="utf-8">
|
20
|
+
if (window.top.frames.main) document.body.className = 'frames';
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<div id="header">
|
24
|
+
<div id="menu">
|
25
|
+
|
26
|
+
<a href="../_index.html">Index (P)</a> »
|
27
|
+
<span class='title'><span class='object_link'><a href="../TimelineSetter.html" title="TimelineSetter (module)">TimelineSetter</a></span></span>
|
28
|
+
»
|
29
|
+
<span class="title">Parser</span>
|
30
|
+
|
31
|
+
|
32
|
+
<div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
|
33
|
+
</div>
|
34
|
+
|
35
|
+
<div id="search">
|
36
|
+
<a id="class_list_link" href="#">Class List</a>
|
37
|
+
<a id="method_list_link" href="#">Method List</a>
|
38
|
+
<a id ="file_list_link" href="#">File List</a>
|
39
|
+
</div>
|
40
|
+
|
41
|
+
<div class="clear"></div>
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<iframe id="search_frame"></iframe>
|
45
|
+
|
46
|
+
<div id="content"><h1>Class: TimelineSetter::Parser
|
47
|
+
|
48
|
+
|
49
|
+
|
50
|
+
</h1>
|
51
|
+
|
52
|
+
<dl class="box">
|
53
|
+
|
54
|
+
<dt class="r1">Inherits:</dt>
|
55
|
+
<dd class="r1">
|
56
|
+
<span class="inheritName">Object</span>
|
57
|
+
|
58
|
+
<ul class="fullTree">
|
59
|
+
<li>Object</li>
|
60
|
+
|
61
|
+
<li class="next">TimelineSetter::Parser</li>
|
62
|
+
|
63
|
+
</ul>
|
64
|
+
<a href="#" class="inheritanceTree">show all</a>
|
65
|
+
|
66
|
+
</dd>
|
67
|
+
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
<dt class="r2 last">Defined in:</dt>
|
77
|
+
<dd class="r2 last">lib/timeline_setter/parser.rb</dd>
|
78
|
+
|
79
|
+
</dl>
|
80
|
+
<div class="clear"></div>
|
81
|
+
|
82
|
+
|
83
|
+
|
84
|
+
<h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
|
85
|
+
<ul class="summary">
|
86
|
+
|
87
|
+
<li class="public ">
|
88
|
+
<span class="summary_signature">
|
89
|
+
|
90
|
+
<a href="#events-instance_method" title="#events (instance method)">- (Object) <strong>events</strong> </a>
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
</span>
|
95
|
+
|
96
|
+
|
97
|
+
<span class="note title readonly">readonly</span>
|
98
|
+
|
99
|
+
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
|
104
|
+
|
105
|
+
|
106
|
+
<span class="summary_desc"><div class='inline'><p>
|
107
|
+
Returns the value of attribute events.
|
108
|
+
</p>
|
109
|
+
</div></span>
|
110
|
+
|
111
|
+
</li>
|
112
|
+
|
113
|
+
|
114
|
+
</ul>
|
115
|
+
|
116
|
+
|
117
|
+
|
118
|
+
<h2>
|
119
|
+
Instance Method Summary
|
120
|
+
<small>(<a href="#" class="summary_toggle">collapse</a>)</small>
|
121
|
+
</h2>
|
122
|
+
|
123
|
+
<ul class="summary">
|
124
|
+
|
125
|
+
<li class="public ">
|
126
|
+
<span class="summary_signature">
|
127
|
+
|
128
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">- (Parser) <strong>initialize</strong>(sheet) </a>
|
129
|
+
|
130
|
+
|
131
|
+
|
132
|
+
</span>
|
133
|
+
|
134
|
+
<span class="note title constructor">constructor</span>
|
135
|
+
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
<span class="summary_desc"><div class='inline'><p>
|
144
|
+
Initialize a new timeline from a CSV file via TableFu, add a hash for each
|
145
|
+
row (event) in the sheet to an events array.
|
146
|
+
</p>
|
147
|
+
</div></span>
|
148
|
+
|
149
|
+
</li>
|
150
|
+
|
151
|
+
|
152
|
+
</ul>
|
153
|
+
|
154
|
+
|
155
|
+
<div id="constructor_details" class="method_details_list">
|
156
|
+
<h2>Constructor Details</h2>
|
157
|
+
|
158
|
+
<div class="method_details first">
|
159
|
+
<p class="signature first" id="initialize-instance_method">
|
160
|
+
|
161
|
+
- (<tt><span class='object_link'><a href="" title="TimelineSetter::Parser (class)">Parser</a></span></tt>) <strong>initialize</strong>(sheet)
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
</p><div class="docstring">
|
166
|
+
<div class="discussion">
|
167
|
+
<p>
|
168
|
+
Initialize a new timeline from a CSV file via TableFu, add a hash for each
|
169
|
+
row (event) in the sheet to an events array. Sheet should contain columns
|
170
|
+
for
|
171
|
+
</p>
|
172
|
+
<pre class="code">
|
173
|
+
<span class='mult op'>*</span> <span class='date identifier id'>date</span>
|
174
|
+
<span class='mult op'>*</span> <span class='display_date identifier id'>display_date</span>
|
175
|
+
<span class='mult op'>*</span> <span class='description identifier id'>description</span>
|
176
|
+
<span class='mult op'>*</span> <span class='link identifier id'>link</span>
|
177
|
+
<span class='mult op'>*</span> <span class='thumbnail identifier id'>thumbnail</span>
|
178
|
+
<span class='mult op'>*</span> <span class='series identifier id'>series</span>
|
179
|
+
<span class='mult op'>*</span> <span class='html identifier id'>html</span>
|
180
|
+
</pre>
|
181
|
+
|
182
|
+
|
183
|
+
</div>
|
184
|
+
</div>
|
185
|
+
<div class="tags">
|
186
|
+
|
187
|
+
</div><table class="source_code">
|
188
|
+
<tr>
|
189
|
+
<td>
|
190
|
+
<pre class="lines">
|
191
|
+
|
192
|
+
|
193
|
+
16
|
194
|
+
17
|
195
|
+
18
|
196
|
+
19
|
197
|
+
20
|
198
|
+
21
|
199
|
+
22
|
200
|
+
23
|
201
|
+
24
|
202
|
+
25
|
203
|
+
26</pre>
|
204
|
+
</td>
|
205
|
+
<td>
|
206
|
+
<pre class="code"><span class="info file"># File 'lib/timeline_setter/parser.rb', line 16</span>
|
207
|
+
|
208
|
+
<span class='def def kw'>def</span> <span class='initialize identifier id'>initialize</span><span class='lparen token'>(</span><span class='sheet identifier id'>sheet</span><span class='rparen token'>)</span>
|
209
|
+
<span class='@events ivar id'>@events</span> <span class='assign token'>=</span> <span class='lbrack token'>[</span><span class='rbrack token'>]</span>
|
210
|
+
<span class='spreadsheet identifier id'>spreadsheet</span> <span class='assign token'>=</span> <span class='TableFu constant id'>TableFu</span><span class='dot token'>.</span><span class='new identifier id'>new</span><span class='lparen token'>(</span><span class='sheet identifier id'>sheet</span><span class='rparen token'>)</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='s identifier id'>s</span><span class='bitor op'>|</span>
|
211
|
+
<span class='s identifier id'>s</span><span class='dot token'>.</span><span class='columns identifier id'>columns</span> <span class='assign token'>=</span> <span class='dstring node'>%w[date display_date description link series html]</span>
|
212
|
+
<span class='end end kw'>end</span>
|
213
|
+
|
214
|
+
<span class='spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='rows identifier id'>rows</span><span class='dot token'>.</span><span class='each identifier id'>each</span> <span class='do do kw'>do</span> <span class='bitor op'>|</span><span class='row identifier id'>row</span><span class='bitor op'>|</span>
|
215
|
+
<span class='hash identifier id'>hash</span> <span class='assign token'>=</span> <span class='spreadsheet identifier id'>spreadsheet</span><span class='dot token'>.</span><span class='columns identifier id'>columns</span><span class='dot token'>.</span><span class='inject identifier id'>inject</span><span class='lparen token'>(</span><span class='lbrace token'>{</span><span class='rbrace token'>}</span><span class='rparen token'>)</span> <span class='lbrace token'>{</span><span class='bitor op'>|</span><span class='memo identifier id'>memo</span><span class='comma token'>,</span> <span class='column identifier id'>column</span><span class='bitor op'>|</span> <span class='memo identifier id'>memo</span><span class='lbrack token'>[</span><span class='column identifier id'>column</span><span class='dot token'>.</span><span class='to_sym identifier id'>to_sym</span><span class='rbrack token'>]</span> <span class='assign token'>=</span> <span class='row identifier id'>row</span><span class='lbrack token'>[</span><span class='column identifier id'>column</span><span class='rbrack token'>]</span><span class='dot token'>.</span><span class='to_s identifier id'>to_s</span> <span class='semicolon token'>;</span> <span class='memo identifier id'>memo</span><span class='rbrace token'>}</span>
|
216
|
+
<span class='@events ivar id'>@events</span> <span class='lshft op'><<</span> <span class='hash identifier id'>hash</span>
|
217
|
+
<span class='end end kw'>end</span>
|
218
|
+
<span class='end end kw'>end</span>
|
219
|
+
</pre>
|
220
|
+
</td>
|
221
|
+
</tr>
|
222
|
+
</table>
|
223
|
+
</div>
|
224
|
+
|
225
|
+
</div>
|
226
|
+
|
227
|
+
<div id="instance_attr_details" class="attr_details">
|
228
|
+
<h2>Instance Attribute Details</h2>
|
229
|
+
|
230
|
+
|
231
|
+
<span id=""></span>
|
232
|
+
<span id="events-instance_method"></span>
|
233
|
+
<div class="method_details first">
|
234
|
+
<p class="signature first" id="events-instance_method">
|
235
|
+
|
236
|
+
- (<tt>Object</tt>) <strong>events</strong> <span class="extras">(readonly)</span>
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
</p><div class="docstring">
|
241
|
+
<div class="discussion">
|
242
|
+
<p>
|
243
|
+
Returns the value of attribute events
|
244
|
+
</p>
|
245
|
+
|
246
|
+
|
247
|
+
</div>
|
248
|
+
</div>
|
249
|
+
<div class="tags">
|
250
|
+
|
251
|
+
</div><table class="source_code">
|
252
|
+
<tr>
|
253
|
+
<td>
|
254
|
+
<pre class="lines">
|
255
|
+
|
256
|
+
|
257
|
+
3
|
258
|
+
4
|
259
|
+
5</pre>
|
260
|
+
</td>
|
261
|
+
<td>
|
262
|
+
<pre class="code"><span class="info file"># File 'lib/timeline_setter/parser.rb', line 3</span>
|
263
|
+
|
264
|
+
<span class='def def kw'>def</span> <span class='events identifier id'>events</span>
|
265
|
+
<span class='@events ivar id'>@events</span>
|
266
|
+
<span class='end end kw'>end</span>
|
267
|
+
</pre>
|
268
|
+
</td>
|
269
|
+
</tr>
|
270
|
+
</table>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
</div>
|
274
|
+
|
275
|
+
|
276
|
+
</div>
|
277
|
+
|
278
|
+
<div id="footer">
|
279
|
+
Generated on Mon Apr 4 11:05:24 2011 by
|
280
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
281
|
+
0.6.5 (ruby-1.8.7).
|
282
|
+
</div>
|
283
|
+
|
284
|
+
</body>
|
285
|
+
</html>
|