cachetastic 2.1.3 → 2.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/doc/classes/ActiveRecord/Base.html +12 -12
- data/doc/classes/Cachetastic/Adapters/Base.html +33 -33
- data/doc/classes/Cachetastic/Adapters/Drb.html +42 -42
- data/doc/classes/Cachetastic/Adapters/File.html +18 -18
- data/doc/classes/Cachetastic/Adapters/FileBase.html +36 -36
- data/doc/classes/Cachetastic/Adapters/HtmlFile.html +18 -18
- data/doc/classes/Cachetastic/Adapters/LocalMemory.html +42 -42
- data/doc/classes/Cachetastic/Adapters/Memcache.html +72 -72
- data/doc/classes/Cachetastic/Cacheable.html +16 -16
- data/doc/classes/Cachetastic/Cacheable/ClassAndInstanceMethods.html +18 -18
- data/doc/classes/Cachetastic/Cacheable/ClassOnlyMethods.html +18 -18
- data/doc/classes/Cachetastic/Caches/Base.html +94 -94
- data/doc/classes/Cachetastic/Caches/Base/RegisteredCaches.html +6 -6
- data/doc/classes/Cachetastic/Caches/RailsSessionCache.html +6 -6
- data/doc/classes/Cachetastic/Connection.html +13 -13
- data/doc/classes/Cachetastic/Errors/UnsupportedAdapter.html +6 -6
- data/doc/classes/Cachetastic/Logger.html +6 -6
- data/doc/classes/Object.html +38 -6
- data/doc/classes/String.html +172 -0
- data/doc/created.rid +1 -1
- data/doc/files/lib/cachetastic/ruby_extensions/object_rb.html +1 -1
- data/doc/files/lib/cachetastic/ruby_extensions/string_rb.html +101 -0
- data/doc/files/lib/cachetastic_rb.html +1 -1
- data/doc/fr_class_index.html +1 -0
- data/doc/fr_file_index.html +1 -0
- data/doc/fr_method_index.html +77 -74
- data/lib/cachetastic.rb +1 -0
- data/lib/cachetastic/ruby_extensions/object.rb +14 -0
- data/lib/cachetastic/ruby_extensions/string.rb +15 -0
- data/test/memcache_adapter_test.rb +4 -0
- data/test/test_helper.rb +1 -2
- metadata +5 -2
@@ -96,7 +96,7 @@ href="../Base.html">Cachetastic::Caches::Base</a>.
|
|
96
96
|
<h3 class="section-bar">Methods</h3>
|
97
97
|
|
98
98
|
<div class="name-list">
|
99
|
-
<a href="#
|
99
|
+
<a href="#M000065">new</a>
|
100
100
|
</div>
|
101
101
|
</div>
|
102
102
|
|
@@ -141,19 +141,19 @@ list of all caches registered with the system.
|
|
141
141
|
<div id="methods">
|
142
142
|
<h3 class="section-bar">Public Class methods</h3>
|
143
143
|
|
144
|
-
<div id="method-
|
145
|
-
<a name="
|
144
|
+
<div id="method-M000065" class="method-detail">
|
145
|
+
<a name="M000065"></a>
|
146
146
|
|
147
147
|
<div class="method-heading">
|
148
|
-
<a href="#
|
148
|
+
<a href="#M000065" class="method-signature">
|
149
149
|
<span class="method-name">new</span><span class="method-args">()</span>
|
150
150
|
</a>
|
151
151
|
</div>
|
152
152
|
|
153
153
|
<div class="method-description">
|
154
154
|
<p><a class="source-toggle" href="#"
|
155
|
-
onclick="toggleCode('
|
156
|
-
<div class="method-source-code" id="
|
155
|
+
onclick="toggleCode('M000065-source');return false;">[Source]</a></p>
|
156
|
+
<div class="method-source-code" id="M000065-source">
|
157
157
|
<pre>
|
158
158
|
<span class="ruby-comment cmt"># File lib/cachetastic/caches/base.rb, line 37</span>
|
159
159
|
37: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
@@ -94,7 +94,7 @@ Used for storing Rails sessions.
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
97
|
+
<a href="#M000050">unsupported_adapters</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -116,19 +116,19 @@ Used for storing Rails sessions.
|
|
116
116
|
<div id="methods">
|
117
117
|
<h3 class="section-bar">Public Class methods</h3>
|
118
118
|
|
119
|
-
<div id="method-
|
120
|
-
<a name="
|
119
|
+
<div id="method-M000050" class="method-detail">
|
120
|
+
<a name="M000050"></a>
|
121
121
|
|
122
122
|
<div class="method-heading">
|
123
|
-
<a href="#
|
123
|
+
<a href="#M000050" class="method-signature">
|
124
124
|
<span class="method-name">unsupported_adapters</span><span class="method-args">()</span>
|
125
125
|
</a>
|
126
126
|
</div>
|
127
127
|
|
128
128
|
<div class="method-description">
|
129
129
|
<p><a class="source-toggle" href="#"
|
130
|
-
onclick="toggleCode('
|
131
|
-
<div class="method-source-code" id="
|
130
|
+
onclick="toggleCode('M000050-source');return false;">[Source]</a></p>
|
131
|
+
<div class="method-source-code" id="M000050-source">
|
132
132
|
<pre>
|
133
133
|
<span class="ruby-comment cmt"># File lib/cachetastic/caches/rails_session_cache.rb, line 6</span>
|
134
134
|
6: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">unsupported_adapters</span>
|
@@ -94,8 +94,8 @@ This class caches adapter objects for each cache in the system.
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
98
|
-
<a href="#
|
97
|
+
<a href="#M000076">get</a>
|
98
|
+
<a href="#M000075">new</a>
|
99
99
|
</div>
|
100
100
|
</div>
|
101
101
|
|
@@ -137,19 +137,19 @@ This class caches adapter objects for each cache in the system.
|
|
137
137
|
<div id="methods">
|
138
138
|
<h3 class="section-bar">Public Class methods</h3>
|
139
139
|
|
140
|
-
<div id="method-
|
141
|
-
<a name="
|
140
|
+
<div id="method-M000075" class="method-detail">
|
141
|
+
<a name="M000075"></a>
|
142
142
|
|
143
143
|
<div class="method-heading">
|
144
|
-
<a href="#
|
144
|
+
<a href="#M000075" class="method-signature">
|
145
145
|
<span class="method-name">new</span><span class="method-args">()</span>
|
146
146
|
</a>
|
147
147
|
</div>
|
148
148
|
|
149
149
|
<div class="method-description">
|
150
150
|
<p><a class="source-toggle" href="#"
|
151
|
-
onclick="toggleCode('
|
152
|
-
<div class="method-source-code" id="
|
151
|
+
onclick="toggleCode('M000075-source');return false;">[Source]</a></p>
|
152
|
+
<div class="method-source-code" id="M000075-source">
|
153
153
|
<pre>
|
154
154
|
<span class="ruby-comment cmt"># File lib/cachetastic/connection.rb, line 7</span>
|
155
155
|
7: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>
|
@@ -162,11 +162,11 @@ This class caches adapter objects for each cache in the system.
|
|
162
162
|
|
163
163
|
<h3 class="section-bar">Public Instance methods</h3>
|
164
164
|
|
165
|
-
<div id="method-
|
166
|
-
<a name="
|
165
|
+
<div id="method-M000076" class="method-detail">
|
166
|
+
<a name="M000076"></a>
|
167
167
|
|
168
168
|
<div class="method-heading">
|
169
|
-
<a href="#
|
169
|
+
<a href="#M000076" class="method-signature">
|
170
170
|
<span class="method-name">get</span><span class="method-args">(name)</span>
|
171
171
|
</a>
|
172
172
|
</div>
|
@@ -176,11 +176,11 @@ This class caches adapter objects for each cache in the system.
|
|
176
176
|
Takes the name of the cache, that‘s been methodized, and returns back
|
177
177
|
the adapter object associated with the cache. If the adapter object
|
178
178
|
doesn‘t exist or if the adapter is no longer valid (adapter.valid?) a
|
179
|
-
<a href="Connection.html#
|
179
|
+
<a href="Connection.html#M000075">new</a> one is created and returned.
|
180
180
|
</p>
|
181
181
|
<p><a class="source-toggle" href="#"
|
182
|
-
onclick="toggleCode('
|
183
|
-
<div class="method-source-code" id="
|
182
|
+
onclick="toggleCode('M000076-source');return false;">[Source]</a></p>
|
183
|
+
<div class="method-source-code" id="M000076-source">
|
184
184
|
<pre>
|
185
185
|
<span class="ruby-comment cmt"># File lib/cachetastic/connection.rb, line 14</span>
|
186
186
|
14: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">get</span>(<span class="ruby-identifier">name</span>)
|
@@ -86,7 +86,7 @@
|
|
86
86
|
<h3 class="section-bar">Methods</h3>
|
87
87
|
|
88
88
|
<div class="name-list">
|
89
|
-
<a href="#
|
89
|
+
<a href="#M000006">new</a>
|
90
90
|
</div>
|
91
91
|
</div>
|
92
92
|
|
@@ -108,19 +108,19 @@
|
|
108
108
|
<div id="methods">
|
109
109
|
<h3 class="section-bar">Public Class methods</h3>
|
110
110
|
|
111
|
-
<div id="method-
|
112
|
-
<a name="
|
111
|
+
<div id="method-M000006" class="method-detail">
|
112
|
+
<a name="M000006"></a>
|
113
113
|
|
114
114
|
<div class="method-heading">
|
115
|
-
<a href="#
|
115
|
+
<a href="#M000006" class="method-signature">
|
116
116
|
<span class="method-name">new</span><span class="method-args">(cache_name, adapter)</span>
|
117
117
|
</a>
|
118
118
|
</div>
|
119
119
|
|
120
120
|
<div class="method-description">
|
121
121
|
<p><a class="source-toggle" href="#"
|
122
|
-
onclick="toggleCode('
|
123
|
-
<div class="method-source-code" id="
|
122
|
+
onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
|
123
|
+
<div class="method-source-code" id="M000006-source">
|
124
124
|
<pre>
|
125
125
|
<span class="ruby-comment cmt"># File lib/cachetastic/errors/unsupported_adapter.rb, line 3</span>
|
126
126
|
3: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">cache_name</span>, <span class="ruby-identifier">adapter</span>)
|
@@ -94,7 +94,7 @@ This class handles logging for the caches and their adapters.
|
|
94
94
|
<h3 class="section-bar">Methods</h3>
|
95
95
|
|
96
96
|
<div class="name-list">
|
97
|
-
<a href="#
|
97
|
+
<a href="#M000074">new</a>
|
98
98
|
</div>
|
99
99
|
</div>
|
100
100
|
|
@@ -145,19 +145,19 @@ attr_accessor :options attr_accessor :cache_name
|
|
145
145
|
<div id="methods">
|
146
146
|
<h3 class="section-bar">Public Class methods</h3>
|
147
147
|
|
148
|
-
<div id="method-
|
149
|
-
<a name="
|
148
|
+
<div id="method-M000074" class="method-detail">
|
149
|
+
<a name="M000074"></a>
|
150
150
|
|
151
151
|
<div class="method-heading">
|
152
|
-
<a href="#
|
152
|
+
<a href="#M000074" class="method-signature">
|
153
153
|
<span class="method-name">new</span><span class="method-args">(loggers)</span>
|
154
154
|
</a>
|
155
155
|
</div>
|
156
156
|
|
157
157
|
<div class="method-description">
|
158
158
|
<p><a class="source-toggle" href="#"
|
159
|
-
onclick="toggleCode('
|
160
|
-
<div class="method-source-code" id="
|
159
|
+
onclick="toggleCode('M000074-source');return false;">[Source]</a></p>
|
160
|
+
<div class="method-source-code" id="M000074-source">
|
161
161
|
<pre>
|
162
162
|
<span class="ruby-comment cmt"># File lib/cachetastic/logger.rb, line 8</span>
|
163
163
|
8: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">loggers</span>)
|
data/doc/classes/Object.html
CHANGED
@@ -93,7 +93,8 @@
|
|
93
93
|
|
94
94
|
<div class="name-list">
|
95
95
|
<a href="#M000001">cachetastic_key</a>
|
96
|
-
<a href="#M000002">
|
96
|
+
<a href="#M000002">ivar_cache</a>
|
97
|
+
<a href="#M000003">needs_method</a>
|
97
98
|
</div>
|
98
99
|
</div>
|
99
100
|
|
@@ -115,11 +116,11 @@
|
|
115
116
|
<div id="methods">
|
116
117
|
<h3 class="section-bar">Public Class methods</h3>
|
117
118
|
|
118
|
-
<div id="method-
|
119
|
-
<a name="
|
119
|
+
<div id="method-M000003" class="method-detail">
|
120
|
+
<a name="M000003"></a>
|
120
121
|
|
121
122
|
<div class="method-heading">
|
122
|
-
<a href="#
|
123
|
+
<a href="#M000003" class="method-signature">
|
123
124
|
<span class="method-name">needs_method</span><span class="method-args">(meth)</span>
|
124
125
|
</a>
|
125
126
|
</div>
|
@@ -132,8 +133,8 @@ for creating interfaces and you want to stub out methods that others need
|
|
132
133
|
to implement.
|
133
134
|
</p>
|
134
135
|
<p><a class="source-toggle" href="#"
|
135
|
-
onclick="toggleCode('
|
136
|
-
<div class="method-source-code" id="
|
136
|
+
onclick="toggleCode('M000003-source');return false;">[Source]</a></p>
|
137
|
+
<div class="method-source-code" id="M000003-source">
|
137
138
|
<pre>
|
138
139
|
<span class="ruby-comment cmt"># File lib/cachetastic.rb, line 24</span>
|
139
140
|
24: <span class="ruby-keyword kw">def</span> <span class="ruby-keyword kw">self</span>.<span class="ruby-identifier">needs_method</span>(<span class="ruby-identifier">meth</span>)
|
@@ -175,6 +176,37 @@ href="Cachetastic/Cacheable.html">Cachetastic::Cacheable</a> module.
|
|
175
176
|
</div>
|
176
177
|
</div>
|
177
178
|
|
179
|
+
<div id="method-M000002" class="method-detail">
|
180
|
+
<a name="M000002"></a>
|
181
|
+
|
182
|
+
<div class="method-heading">
|
183
|
+
<a href="#M000002" class="method-signature">
|
184
|
+
<span class="method-name">ivar_cache</span><span class="method-args">(var_name = nil) {|| ...}</span>
|
185
|
+
</a>
|
186
|
+
</div>
|
187
|
+
|
188
|
+
<div class="method-description">
|
189
|
+
<p><a class="source-toggle" href="#"
|
190
|
+
onclick="toggleCode('M000002-source');return false;">[Source]</a></p>
|
191
|
+
<div class="method-source-code" id="M000002-source">
|
192
|
+
<pre>
|
193
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/object.rb, line 9</span>
|
194
|
+
9: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">ivar_cache</span>(<span class="ruby-identifier">var_name</span> = <span class="ruby-keyword kw">nil</span>, <span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
195
|
+
10: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">var_name</span>.<span class="ruby-identifier">nil?</span>
|
196
|
+
11: <span class="ruby-identifier">call</span> = <span class="ruby-identifier">caller</span>[<span class="ruby-value">0</span>]
|
197
|
+
12: <span class="ruby-identifier">var_name</span> = <span class="ruby-identifier">call</span>[(<span class="ruby-identifier">call</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">'`'</span>)<span class="ruby-operator">+</span><span class="ruby-value">1</span>)<span class="ruby-operator">...</span><span class="ruby-identifier">call</span>.<span class="ruby-identifier">index</span>(<span class="ruby-value str">"'"</span>)]
|
198
|
+
13: <span class="ruby-keyword kw">end</span>
|
199
|
+
14: <span class="ruby-identifier">var</span> = <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{var_name}"</span>)
|
200
|
+
15: <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">var</span>
|
201
|
+
16: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">instance_variable_set</span>(<span class="ruby-node">"@#{var_name}"</span>, <span class="ruby-keyword kw">yield</span>) <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">block_given?</span>
|
202
|
+
17: <span class="ruby-keyword kw">end</span>
|
203
|
+
18: <span class="ruby-identifier">instance_variable_get</span>(<span class="ruby-node">"@#{var_name}"</span>)
|
204
|
+
19: <span class="ruby-keyword kw">end</span>
|
205
|
+
</pre>
|
206
|
+
</div>
|
207
|
+
</div>
|
208
|
+
</div>
|
209
|
+
|
178
210
|
|
179
211
|
</div>
|
180
212
|
|
@@ -0,0 +1,172 @@
|
|
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: String</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">String</td>
|
54
|
+
</tr>
|
55
|
+
<tr class="top-aligned-row">
|
56
|
+
<td><strong>In:</strong></td>
|
57
|
+
<td>
|
58
|
+
<a href="../files/lib/cachetastic/ruby_extensions/string_rb.html">
|
59
|
+
lib/cachetastic/ruby_extensions/string.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="Object.html">
|
69
|
+
Object
|
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="#M000004">camelcase</a>
|
92
|
+
<a href="#M000005">constantize</a>
|
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-M000004" class="method-detail">
|
115
|
+
<a name="M000004"></a>
|
116
|
+
|
117
|
+
<div class="method-heading">
|
118
|
+
<a href="#M000004" class="method-signature">
|
119
|
+
<span class="method-name">camelcase</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('M000004-source');return false;">[Source]</a></p>
|
126
|
+
<div class="method-source-code" id="M000004-source">
|
127
|
+
<pre>
|
128
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/string.rb, line 4</span>
|
129
|
+
4: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">camelcase</span>
|
130
|
+
5: <span class="ruby-identifier">to_s</span>.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/\/(.?)/</span>){ <span class="ruby-node">"::#{$1.upcase}"</span> }.<span class="ruby-identifier">gsub</span>(<span class="ruby-regexp re">/(?:^|_)(.)/</span>){ <span class="ruby-identifier">$1</span>.<span class="ruby-identifier">upcase</span> }
|
131
|
+
6: <span class="ruby-keyword kw">end</span>
|
132
|
+
</pre>
|
133
|
+
</div>
|
134
|
+
</div>
|
135
|
+
</div>
|
136
|
+
|
137
|
+
<div id="method-M000005" class="method-detail">
|
138
|
+
<a name="M000005"></a>
|
139
|
+
|
140
|
+
<div class="method-heading">
|
141
|
+
<a href="#M000005" class="method-signature">
|
142
|
+
<span class="method-name">constantize</span><span class="method-args">()</span>
|
143
|
+
</a>
|
144
|
+
</div>
|
145
|
+
|
146
|
+
<div class="method-description">
|
147
|
+
<p><a class="source-toggle" href="#"
|
148
|
+
onclick="toggleCode('M000005-source');return false;">[Source]</a></p>
|
149
|
+
<div class="method-source-code" id="M000005-source">
|
150
|
+
<pre>
|
151
|
+
<span class="ruby-comment cmt"># File lib/cachetastic/ruby_extensions/string.rb, line 10</span>
|
152
|
+
10: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">constantize</span>
|
153
|
+
11: <span class="ruby-constant">Module</span>.<span class="ruby-identifier">instance_eval</span>(<span class="ruby-node">"::#{self}"</span>)
|
154
|
+
12: <span class="ruby-keyword kw">end</span>
|
155
|
+
</pre>
|
156
|
+
</div>
|
157
|
+
</div>
|
158
|
+
</div>
|
159
|
+
|
160
|
+
|
161
|
+
</div>
|
162
|
+
|
163
|
+
|
164
|
+
</div>
|
165
|
+
|
166
|
+
|
167
|
+
<div id="validator-badges">
|
168
|
+
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
169
|
+
</div>
|
170
|
+
|
171
|
+
</body>
|
172
|
+
</html>
|