scharfie-rails-footnotes 3.4.2 → 3.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. data/VERSION +1 -0
  2. data/pkg/scharfie-rails-footnotes-3.4.2.gem +0 -0
  3. data/rdoc/classes/ActionController.html +107 -0
  4. data/rdoc/classes/ActionController/Base.html +119 -0
  5. data/rdoc/classes/Footnotes.html +186 -0
  6. data/rdoc/classes/Footnotes/Components.html +211 -0
  7. data/rdoc/classes/Footnotes/Extensions.html +128 -0
  8. data/rdoc/classes/Footnotes/Extensions/AbstractAdapter.html +148 -0
  9. data/rdoc/classes/Footnotes/Extensions/Exception.html +205 -0
  10. data/rdoc/classes/Footnotes/Extensions/MockController.html +111 -0
  11. data/rdoc/classes/Footnotes/Extensions/QueryAnalyzer.html +183 -0
  12. data/rdoc/classes/Footnotes/Extensions/Routes.html +148 -0
  13. data/rdoc/classes/Footnotes/Extensions/Sql.html +191 -0
  14. data/rdoc/classes/Footnotes/Filter.html +928 -0
  15. data/rdoc/classes/Footnotes/Notes.html +194 -0
  16. data/rdoc/classes/Footnotes/Notes/AbstractNote.html +698 -0
  17. data/rdoc/classes/Footnotes/Notes/ComponentsNote.html +221 -0
  18. data/rdoc/classes/Footnotes/Notes/ComponentsNote/ClassMethods.html +164 -0
  19. data/rdoc/classes/Footnotes/Notes/ControllerComponentNote.html +120 -0
  20. data/rdoc/classes/Footnotes/Notes/ControllerNote.html +361 -0
  21. data/rdoc/classes/Footnotes/Notes/CookiesNote.html +198 -0
  22. data/rdoc/classes/Footnotes/Notes/EnvNote.html +178 -0
  23. data/rdoc/classes/Footnotes/Notes/FilesNote.html +284 -0
  24. data/rdoc/classes/Footnotes/Notes/FiltersNote.html +291 -0
  25. data/rdoc/classes/Footnotes/Notes/GeneralNote.html +196 -0
  26. data/rdoc/classes/Footnotes/Notes/JavascriptsNote.html +174 -0
  27. data/rdoc/classes/Footnotes/Notes/LayoutNote.html +248 -0
  28. data/rdoc/classes/Footnotes/Notes/LogNote.html +216 -0
  29. data/rdoc/classes/Footnotes/Notes/ParamsComponentNote.html +120 -0
  30. data/rdoc/classes/Footnotes/Notes/ParamsNote.html +198 -0
  31. data/rdoc/classes/Footnotes/Notes/QueriesNote.html +384 -0
  32. data/rdoc/classes/Footnotes/Notes/RoutesNote.html +240 -0
  33. data/rdoc/classes/Footnotes/Notes/SessionNote.html +174 -0
  34. data/rdoc/classes/Footnotes/Notes/StylesheetsNote.html +174 -0
  35. data/rdoc/classes/Footnotes/Notes/ViewComponentNote.html +120 -0
  36. data/rdoc/classes/Footnotes/Notes/ViewNote.html +273 -0
  37. data/rdoc/created.rid +1 -0
  38. data/rdoc/files/README.html +118 -0
  39. data/rdoc/files/lib/rails-footnotes/backtracer_rb.html +101 -0
  40. data/rdoc/files/lib/rails-footnotes/footnotes_rb.html +101 -0
  41. data/rdoc/files/lib/rails-footnotes/notes/abstract_note_rb.html +101 -0
  42. data/rdoc/files/lib/rails-footnotes/notes/components_note_rb.html +101 -0
  43. data/rdoc/files/lib/rails-footnotes/notes/controller_note_rb.html +101 -0
  44. data/rdoc/files/lib/rails-footnotes/notes/cookies_note_rb.html +101 -0
  45. data/rdoc/files/lib/rails-footnotes/notes/env_note_rb.html +101 -0
  46. data/rdoc/files/lib/rails-footnotes/notes/files_note_rb.html +101 -0
  47. data/rdoc/files/lib/rails-footnotes/notes/filters_note_rb.html +101 -0
  48. data/rdoc/files/lib/rails-footnotes/notes/general_note_rb.html +101 -0
  49. data/rdoc/files/lib/rails-footnotes/notes/javascripts_note_rb.html +101 -0
  50. data/rdoc/files/lib/rails-footnotes/notes/layout_note_rb.html +101 -0
  51. data/rdoc/files/lib/rails-footnotes/notes/log_note_rb.html +101 -0
  52. data/rdoc/files/lib/rails-footnotes/notes/params_note_rb.html +101 -0
  53. data/rdoc/files/lib/rails-footnotes/notes/queries_note_rb.html +101 -0
  54. data/rdoc/files/lib/rails-footnotes/notes/routes_note_rb.html +101 -0
  55. data/rdoc/files/lib/rails-footnotes/notes/session_note_rb.html +101 -0
  56. data/rdoc/files/lib/rails-footnotes/notes/stylesheets_note_rb.html +101 -0
  57. data/rdoc/files/lib/rails-footnotes/notes/view_note_rb.html +101 -0
  58. data/rdoc/files/lib/rails-footnotes_rb.html +101 -0
  59. data/rdoc/fr_class_index.html +60 -0
  60. data/rdoc/fr_file_index.html +47 -0
  61. data/rdoc/fr_method_index.html +156 -0
  62. data/rdoc/index.html +24 -0
  63. data/rdoc/rdoc-style.css +208 -0
  64. data/scharfie-rails-footnotes.gemspec +142 -0
  65. metadata +66 -3
  66. data/rails-footnotes.gemspec +0 -46
@@ -0,0 +1,174 @@
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: Footnotes::Notes::JavascriptsNote</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">Footnotes::Notes::JavascriptsNote</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/rails-footnotes/notes/javascripts_note_rb.html">
59
+ lib/rails-footnotes/notes/javascripts_note.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
+ <a href="FilesNote.html">
69
+ FilesNote
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000017">scan_text</a>&nbsp;&nbsp;
92
+ <a href="#M000016">title</a>&nbsp;&nbsp;
93
+ </div>
94
+ </div>
95
+
96
+ </div>
97
+
98
+
99
+ <!-- if includes -->
100
+
101
+ <div id="section">
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <!-- if method_list -->
111
+ <div id="methods">
112
+ <h3 class="section-bar">Public Instance methods</h3>
113
+
114
+ <div id="method-M000016" class="method-detail">
115
+ <a name="M000016"></a>
116
+
117
+ <div class="method-heading">
118
+ <a href="#M000016" class="method-signature">
119
+ <span class="method-name">title</span><span class="method-args">()</span>
120
+ </a>
121
+ </div>
122
+
123
+ <div class="method-description">
124
+ <p><a class="source-toggle" href="#"
125
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000016-source">
127
+ <pre>
128
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/javascripts_note.rb, line 6</span>
129
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">title</span>
130
+ <span class="ruby-node">&quot;Javascripts (#{@files.length})&quot;</span>
131
+ <span class="ruby-keyword kw">end</span>
132
+ </pre>
133
+ </div>
134
+ </div>
135
+ </div>
136
+
137
+ <h3 class="section-bar">Protected Instance methods</h3>
138
+
139
+ <div id="method-M000017" class="method-detail">
140
+ <a name="M000017"></a>
141
+
142
+ <div class="method-heading">
143
+ <a href="#M000017" class="method-signature">
144
+ <span class="method-name">scan_text</span><span class="method-args">(text)</span>
145
+ </a>
146
+ </div>
147
+
148
+ <div class="method-description">
149
+ <p><a class="source-toggle" href="#"
150
+ onclick="toggleCode('M000017-source');return false;">[Source]</a></p>
151
+ <div class="method-source-code" id="M000017-source">
152
+ <pre>
153
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/javascripts_note.rb, line 11</span>
154
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">scan_text</span>(<span class="ruby-identifier">text</span>)
155
+ <span class="ruby-identifier">text</span>.<span class="ruby-identifier">scan</span>(<span class="ruby-regexp re">/&lt;script[^&gt;]+src\s*=\s*['&quot;]([^&gt;?'&quot;]+\.js)/i</span><span class="ruby-identifier">m</span>).<span class="ruby-identifier">flatten</span>
156
+ <span class="ruby-keyword kw">end</span>
157
+ </pre>
158
+ </div>
159
+ </div>
160
+ </div>
161
+
162
+
163
+ </div>
164
+
165
+
166
+ </div>
167
+
168
+
169
+ <div id="validator-badges">
170
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
171
+ </div>
172
+
173
+ </body>
174
+ </html>
@@ -0,0 +1,248 @@
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: Footnotes::Notes::LayoutNote</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">Footnotes::Notes::LayoutNote</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/rails-footnotes/notes/layout_note_rb.html">
59
+ lib/rails-footnotes/notes/layout_note.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
+ <a href="AbstractNote.html">
69
+ AbstractNote
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000095">filename</a>&nbsp;&nbsp;
92
+ <a href="#M000093">link</a>&nbsp;&nbsp;
93
+ <a href="#M000091">new</a>&nbsp;&nbsp;
94
+ <a href="#M000092">row</a>&nbsp;&nbsp;
95
+ <a href="#M000094">valid?</a>&nbsp;&nbsp;
96
+ </div>
97
+ </div>
98
+
99
+ </div>
100
+
101
+
102
+ <!-- if includes -->
103
+
104
+ <div id="section">
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+ <!-- if method_list -->
114
+ <div id="methods">
115
+ <h3 class="section-bar">Public Class methods</h3>
116
+
117
+ <div id="method-M000091" class="method-detail">
118
+ <a name="M000091"></a>
119
+
120
+ <div class="method-heading">
121
+ <a href="#M000091" class="method-signature">
122
+ <span class="method-name">new</span><span class="method-args">(controller)</span>
123
+ </a>
124
+ </div>
125
+
126
+ <div class="method-description">
127
+ <p><a class="source-toggle" href="#"
128
+ onclick="toggleCode('M000091-source');return false;">[Source]</a></p>
129
+ <div class="method-source-code" id="M000091-source">
130
+ <pre>
131
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/layout_note.rb, line 6</span>
132
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">controller</span>)
133
+ <span class="ruby-ivar">@controller</span> = <span class="ruby-identifier">controller</span>
134
+ <span class="ruby-keyword kw">end</span>
135
+ </pre>
136
+ </div>
137
+ </div>
138
+ </div>
139
+
140
+ <h3 class="section-bar">Public Instance methods</h3>
141
+
142
+ <div id="method-M000093" class="method-detail">
143
+ <a name="M000093"></a>
144
+
145
+ <div class="method-heading">
146
+ <a href="#M000093" class="method-signature">
147
+ <span class="method-name">link</span><span class="method-args">()</span>
148
+ </a>
149
+ </div>
150
+
151
+ <div class="method-description">
152
+ <p><a class="source-toggle" href="#"
153
+ onclick="toggleCode('M000093-source');return false;">[Source]</a></p>
154
+ <div class="method-source-code" id="M000093-source">
155
+ <pre>
156
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/layout_note.rb, line 14</span>
157
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">link</span>
158
+ <span class="ruby-identifier">escape</span>(<span class="ruby-constant">Footnotes</span><span class="ruby-operator">::</span><span class="ruby-constant">Filter</span>.<span class="ruby-identifier">prefix</span>(<span class="ruby-identifier">filename</span>, <span class="ruby-value">1</span>, <span class="ruby-value">1</span>))
159
+ <span class="ruby-keyword kw">end</span>
160
+ </pre>
161
+ </div>
162
+ </div>
163
+ </div>
164
+
165
+ <div id="method-M000092" class="method-detail">
166
+ <a name="M000092"></a>
167
+
168
+ <div class="method-heading">
169
+ <a href="#M000092" class="method-signature">
170
+ <span class="method-name">row</span><span class="method-args">()</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ <p><a class="source-toggle" href="#"
176
+ onclick="toggleCode('M000092-source');return false;">[Source]</a></p>
177
+ <div class="method-source-code" id="M000092-source">
178
+ <pre>
179
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/layout_note.rb, line 10</span>
180
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">row</span>
181
+ <span class="ruby-identifier">:edit</span>
182
+ <span class="ruby-keyword kw">end</span>
183
+ </pre>
184
+ </div>
185
+ </div>
186
+ </div>
187
+
188
+ <div id="method-M000094" class="method-detail">
189
+ <a name="M000094"></a>
190
+
191
+ <div class="method-heading">
192
+ <a href="#M000094" class="method-signature">
193
+ <span class="method-name">valid?</span><span class="method-args">()</span>
194
+ </a>
195
+ </div>
196
+
197
+ <div class="method-description">
198
+ <p><a class="source-toggle" href="#"
199
+ onclick="toggleCode('M000094-source');return false;">[Source]</a></p>
200
+ <div class="method-source-code" id="M000094-source">
201
+ <pre>
202
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/layout_note.rb, line 18</span>
203
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">valid?</span>
204
+ <span class="ruby-identifier">prefix?</span> <span class="ruby-operator">&amp;&amp;</span> <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">active_layout</span>
205
+ <span class="ruby-keyword kw">end</span>
206
+ </pre>
207
+ </div>
208
+ </div>
209
+ </div>
210
+
211
+ <h3 class="section-bar">Protected Instance methods</h3>
212
+
213
+ <div id="method-M000095" class="method-detail">
214
+ <a name="M000095"></a>
215
+
216
+ <div class="method-heading">
217
+ <a href="#M000095" class="method-signature">
218
+ <span class="method-name">filename</span><span class="method-args">()</span>
219
+ </a>
220
+ </div>
221
+
222
+ <div class="method-description">
223
+ <p><a class="source-toggle" href="#"
224
+ onclick="toggleCode('M000095-source');return false;">[Source]</a></p>
225
+ <div class="method-source-code" id="M000095-source">
226
+ <pre>
227
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/layout_note.rb, line 23</span>
228
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">filename</span>
229
+ <span class="ruby-constant">File</span>.<span class="ruby-identifier">join</span>(<span class="ruby-constant">File</span>.<span class="ruby-identifier">expand_path</span>(<span class="ruby-constant">RAILS_ROOT</span>), <span class="ruby-value str">'app'</span>, <span class="ruby-value str">'layouts'</span>, <span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">active_layout</span>.<span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">underscore</span>).<span class="ruby-identifier">sub</span>(<span class="ruby-value str">'/layouts/layouts/'</span>, <span class="ruby-value str">'/views/layouts/'</span>)
230
+ <span class="ruby-keyword kw">end</span>
231
+ </pre>
232
+ </div>
233
+ </div>
234
+ </div>
235
+
236
+
237
+ </div>
238
+
239
+
240
+ </div>
241
+
242
+
243
+ <div id="validator-badges">
244
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
245
+ </div>
246
+
247
+ </body>
248
+ </html>
@@ -0,0 +1,216 @@
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: Footnotes::Notes::LogNote</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">Footnotes::Notes::LogNote</td>
54
+ </tr>
55
+ <tr class="top-aligned-row">
56
+ <td><strong>In:</strong></td>
57
+ <td>
58
+ <a href="../../../files/lib/rails-footnotes/notes/log_note_rb.html">
59
+ lib/rails-footnotes/notes/log_note.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
+ <a href="AbstractNote.html">
69
+ AbstractNote
70
+ </a>
71
+ </td>
72
+ </tr>
73
+ </table>
74
+ </div>
75
+ <!-- banner header -->
76
+
77
+ <div id="bodyContent">
78
+
79
+
80
+
81
+ <div id="contextContent">
82
+
83
+
84
+
85
+ </div>
86
+
87
+ <div id="method-list">
88
+ <h3 class="section-bar">Methods</h3>
89
+
90
+ <div class="name-list">
91
+ <a href="#M000033">content</a>&nbsp;&nbsp;
92
+ <a href="#M000034">log_tail</a>&nbsp;&nbsp;
93
+ <a href="#M000032">new</a>&nbsp;&nbsp;
94
+ </div>
95
+ </div>
96
+
97
+ </div>
98
+
99
+
100
+ <!-- if includes -->
101
+
102
+ <div id="section">
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+ <!-- if method_list -->
112
+ <div id="methods">
113
+ <h3 class="section-bar">Public Class methods</h3>
114
+
115
+ <div id="method-M000032" class="method-detail">
116
+ <a name="M000032"></a>
117
+
118
+ <div class="method-heading">
119
+ <a href="#M000032" class="method-signature">
120
+ <span class="method-name">new</span><span class="method-args">(controller)</span>
121
+ </a>
122
+ </div>
123
+
124
+ <div class="method-description">
125
+ <p><a class="source-toggle" href="#"
126
+ onclick="toggleCode('M000032-source');return false;">[Source]</a></p>
127
+ <div class="method-source-code" id="M000032-source">
128
+ <pre>
129
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/log_note.rb, line 6</span>
130
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">controller</span>)
131
+ <span class="ruby-ivar">@controller</span> = <span class="ruby-identifier">controller</span>
132
+ <span class="ruby-keyword kw">end</span>
133
+ </pre>
134
+ </div>
135
+ </div>
136
+ </div>
137
+
138
+ <h3 class="section-bar">Public Instance methods</h3>
139
+
140
+ <div id="method-M000033" class="method-detail">
141
+ <a name="M000033"></a>
142
+
143
+ <div class="method-heading">
144
+ <a href="#M000033" class="method-signature">
145
+ <span class="method-name">content</span><span class="method-args">()</span>
146
+ </a>
147
+ </div>
148
+
149
+ <div class="method-description">
150
+ <p><a class="source-toggle" href="#"
151
+ onclick="toggleCode('M000033-source');return false;">[Source]</a></p>
152
+ <div class="method-source-code" id="M000033-source">
153
+ <pre>
154
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/log_note.rb, line 10</span>
155
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">content</span>
156
+ <span class="ruby-identifier">escape</span>(<span class="ruby-identifier">log_tail</span>).<span class="ruby-identifier">gsub</span>(<span class="ruby-value str">&quot;\n&quot;</span>,<span class="ruby-value str">&quot;&lt;br /&gt;&quot;</span>)
157
+ <span class="ruby-keyword kw">end</span>
158
+ </pre>
159
+ </div>
160
+ </div>
161
+ </div>
162
+
163
+ <h3 class="section-bar">Protected Instance methods</h3>
164
+
165
+ <div id="method-M000034" class="method-detail">
166
+ <a name="M000034"></a>
167
+
168
+ <div class="method-heading">
169
+ <a href="#M000034" class="method-signature">
170
+ <span class="method-name">log_tail</span><span class="method-args">()</span>
171
+ </a>
172
+ </div>
173
+
174
+ <div class="method-description">
175
+ <p><a class="source-toggle" href="#"
176
+ onclick="toggleCode('M000034-source');return false;">[Source]</a></p>
177
+ <div class="method-source-code" id="M000034-source">
178
+ <pre>
179
+ <span class="ruby-comment cmt"># File lib/rails-footnotes/notes/log_note.rb, line 15</span>
180
+ <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">log_tail</span>
181
+ <span class="ruby-identifier">filename</span> = <span class="ruby-keyword kw">if</span> <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@log'</span>)
182
+ <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@log'</span>).<span class="ruby-identifier">path</span>
183
+ <span class="ruby-keyword kw">else</span>
184
+ <span class="ruby-constant">RAILS_DEFAULT_LOGGER</span>.<span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-value str">'@logdev'</span>).<span class="ruby-identifier">filename</span>
185
+ <span class="ruby-keyword kw">end</span>
186
+ <span class="ruby-identifier">file_string</span> = <span class="ruby-constant">File</span>.<span class="ruby-identifier">open</span>(<span class="ruby-identifier">filename</span>).<span class="ruby-identifier">read</span>.<span class="ruby-identifier">to_s</span>
187
+
188
+ <span class="ruby-comment cmt"># We try to select the specified action from the log</span>
189
+ <span class="ruby-comment cmt"># If we can't find it, we get the last 100 lines</span>
190
+ <span class="ruby-comment cmt">#</span>
191
+ <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">rindex</span> = <span class="ruby-identifier">file_string</span>.<span class="ruby-identifier">rindex</span>(<span class="ruby-value str">'Processing '</span><span class="ruby-operator">+</span><span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">controller_class_name</span><span class="ruby-operator">+</span><span class="ruby-value str">'#'</span><span class="ruby-operator">+</span><span class="ruby-ivar">@controller</span>.<span class="ruby-identifier">action_name</span>)
192
+ <span class="ruby-identifier">file_string</span>[<span class="ruby-identifier">rindex</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\e\[.+?m/</span>, <span class="ruby-value str">''</span>)
193
+ <span class="ruby-keyword kw">else</span>
194
+ <span class="ruby-identifier">lines</span> = <span class="ruby-identifier">file_string</span>.<span class="ruby-identifier">split</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
195
+ <span class="ruby-identifier">index</span> = [<span class="ruby-identifier">lines</span>.<span class="ruby-identifier">size</span><span class="ruby-operator">-</span><span class="ruby-value">100</span>,<span class="ruby-value">0</span>].<span class="ruby-identifier">max</span>
196
+ <span class="ruby-identifier">lines</span>[<span class="ruby-identifier">index</span><span class="ruby-operator">..</span><span class="ruby-value">-1</span>].<span class="ruby-identifier">join</span>(<span class="ruby-value str">&quot;\n&quot;</span>)
197
+ <span class="ruby-keyword kw">end</span>
198
+ <span class="ruby-keyword kw">end</span>
199
+ </pre>
200
+ </div>
201
+ </div>
202
+ </div>
203
+
204
+
205
+ </div>
206
+
207
+
208
+ </div>
209
+
210
+
211
+ <div id="validator-badges">
212
+ <p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
213
+ </div>
214
+
215
+ </body>
216
+ </html>