wee 0.5.0 → 0.6.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (157) hide show
  1. data/ChangeLog +132 -0
  2. data/INSTALL +13 -3
  3. data/README +3 -3
  4. data/Rakefile +5 -1
  5. data/bin/wee +100 -0
  6. data/doc/rdoc/classes/Array.html +12 -12
  7. data/doc/rdoc/classes/Cache/StorageCache.html +38 -38
  8. data/doc/rdoc/classes/Cache/Strategy/CapacityBounded.html +30 -30
  9. data/doc/rdoc/classes/Cache/Strategy/LFU.html +24 -24
  10. data/doc/rdoc/classes/Cache/Strategy/LRU.html +24 -24
  11. data/doc/rdoc/classes/Cache/Strategy/Unbounded.html +24 -24
  12. data/doc/rdoc/classes/Enumerable.html +6 -6
  13. data/doc/rdoc/classes/Main.html +265 -0
  14. data/doc/rdoc/classes/Object.html +12 -12
  15. data/doc/rdoc/classes/OgApplication.html +2 -2
  16. data/doc/rdoc/classes/OgScaffolder.html +444 -64
  17. data/doc/rdoc/classes/OgScaffolder/Editor.html +490 -0
  18. data/doc/rdoc/classes/OgSession.html +4 -4
  19. data/doc/rdoc/classes/Recipe.html +113 -0
  20. data/doc/rdoc/classes/String.html +12 -12
  21. data/doc/rdoc/classes/Struct.html +12 -12
  22. data/doc/rdoc/classes/Wee.html +10 -1
  23. data/doc/rdoc/classes/Wee/AnswerDecoration.html +9 -9
  24. data/doc/rdoc/classes/Wee/Application.html +48 -47
  25. data/doc/rdoc/classes/Wee/Brush.html +19 -23
  26. data/doc/rdoc/classes/Wee/Brush/AnchorTag.html +17 -14
  27. data/doc/rdoc/classes/Wee/Brush/FileUploadTag.html +20 -14
  28. data/doc/rdoc/classes/Wee/Brush/FormTag.html +25 -21
  29. data/doc/rdoc/classes/Wee/Brush/GenericEncodedTextBrush.html +12 -12
  30. data/doc/rdoc/classes/Wee/Brush/GenericSingleTagBrush.html +7 -7
  31. data/doc/rdoc/classes/Wee/Brush/GenericTagBrush.html +234 -100
  32. data/doc/rdoc/classes/Wee/Brush/GenericTextBrush.html +12 -12
  33. data/doc/rdoc/classes/Wee/Brush/ImageButtonTag.html +28 -22
  34. data/doc/rdoc/classes/Wee/Brush/ImageTag.html +23 -24
  35. data/doc/rdoc/classes/Wee/Brush/InputTag.html +14 -14
  36. data/doc/rdoc/classes/Wee/Brush/JavascriptTag.html +7 -7
  37. data/doc/rdoc/classes/Wee/Brush/Page.html +14 -14
  38. data/doc/rdoc/classes/Wee/Brush/SelectListTag.html +33 -57
  39. data/doc/rdoc/classes/Wee/Brush/SelectListTag/SelectListCallback.html +154 -0
  40. data/doc/rdoc/classes/Wee/Brush/SelectOptionTag.html +7 -7
  41. data/doc/rdoc/classes/Wee/Brush/SubmitButtonTag.html +20 -14
  42. data/doc/rdoc/classes/Wee/Brush/TableDataTag.html +14 -14
  43. data/doc/rdoc/classes/Wee/Brush/TableHeaderTag.html +7 -7
  44. data/doc/rdoc/classes/Wee/Brush/TableRowTag.html +42 -42
  45. data/doc/rdoc/classes/Wee/Brush/TableTag.html +7 -7
  46. data/doc/rdoc/classes/Wee/Brush/TextAreaTag.html +27 -21
  47. data/doc/rdoc/classes/Wee/Brush/TextInputTag.html +20 -14
  48. data/doc/rdoc/classes/Wee/CallbackRegistry.html +64 -36
  49. data/doc/rdoc/classes/Wee/CallbackStream.html +21 -21
  50. data/doc/rdoc/classes/Wee/Canvas.html +24 -24
  51. data/doc/rdoc/classes/Wee/Component.html +179 -151
  52. data/doc/rdoc/classes/Wee/Component/OnAnswer.html +12 -12
  53. data/doc/rdoc/classes/Wee/Decoration.html +42 -42
  54. data/doc/rdoc/classes/Wee/Delegate.html +27 -27
  55. data/doc/rdoc/classes/Wee/ErrorResponse.html +14 -14
  56. data/doc/rdoc/classes/Wee/FormDecoration.html +6 -6
  57. data/doc/rdoc/classes/Wee/GenericResponse.html +7 -7
  58. data/doc/rdoc/classes/Wee/HtmlCanvas.html +326 -219
  59. data/doc/rdoc/classes/Wee/HtmlWriter.html +40 -40
  60. data/doc/rdoc/classes/Wee/LiteralMethodCallback.html +19 -19
  61. data/doc/rdoc/classes/Wee/Md5IdGenerator.html +181 -0
  62. data/doc/rdoc/classes/Wee/MessageBox.html +12 -12
  63. data/doc/rdoc/classes/Wee/PageDecoration.html +18 -18
  64. data/doc/rdoc/classes/Wee/PagelessApplication.html +152 -0
  65. data/doc/rdoc/classes/Wee/PagelessRequest.html +177 -0
  66. data/doc/rdoc/classes/Wee/PagelessSession.html +320 -0
  67. data/doc/rdoc/classes/Wee/Presenter.html +145 -89
  68. data/doc/rdoc/classes/Wee/RedirectResponse.html +7 -7
  69. data/doc/rdoc/classes/Wee/RefreshResponse.html +7 -7
  70. data/doc/rdoc/classes/Wee/Request.html +116 -50
  71. data/doc/rdoc/classes/Wee/RequestHandler.html +31 -31
  72. data/doc/rdoc/classes/Wee/Response.html +76 -28
  73. data/doc/rdoc/classes/Wee/Session.html +129 -506
  74. data/doc/rdoc/classes/Wee/SimpleIdGenerator.html +22 -40
  75. data/doc/rdoc/classes/Wee/Snapshot.html +19 -19
  76. data/doc/rdoc/classes/Wee/Utils.html +70 -17
  77. data/doc/rdoc/classes/Wee/Utils/LRUCache.html +6 -6
  78. data/doc/rdoc/classes/Wee/ValueHolder.html +18 -18
  79. data/doc/rdoc/classes/Wee/WEBrickAdaptor.html +82 -49
  80. data/doc/rdoc/classes/Wee/WrapperDecoration.html +6 -6
  81. data/doc/rdoc/created.rid +1 -1
  82. data/doc/rdoc/files/INSTALL.html +17 -5
  83. data/doc/rdoc/files/README.html +9 -11
  84. data/doc/rdoc/files/lib/wee/adaptors/webrick_rb.html +1 -1
  85. data/doc/rdoc/files/lib/wee/application_rb.html +1 -1
  86. data/doc/rdoc/files/lib/wee/components/page_decoration_rb.html +1 -1
  87. data/doc/rdoc/files/lib/wee/continuation/session_rb.html +1 -3
  88. data/doc/rdoc/files/lib/wee/core/callback_rb.html +1 -1
  89. data/doc/rdoc/files/lib/wee/core/component_rb.html +1 -1
  90. data/doc/rdoc/files/lib/wee/core_rb.html +3 -3
  91. data/doc/rdoc/files/lib/wee/databases/og/application_rb.html +101 -0
  92. data/doc/rdoc/files/lib/wee/databases/og/old_scaffolder_rb.html +101 -0
  93. data/doc/rdoc/files/lib/wee/databases/og/scaffolder_rb.html +108 -0
  94. data/doc/rdoc/files/lib/wee/databases/og/session_rb.html +101 -0
  95. data/doc/rdoc/files/lib/wee/databases/og_rb.html +4 -1
  96. data/doc/rdoc/files/lib/wee/idgen/md5_rb.html +115 -0
  97. data/doc/rdoc/files/lib/wee/idgen/simple_rb.html +107 -0
  98. data/doc/rdoc/files/lib/wee/pageless/application_rb.html +101 -0
  99. data/doc/rdoc/files/lib/wee/pageless/request_rb.html +101 -0
  100. data/doc/rdoc/files/lib/wee/pageless/session_rb.html +108 -0
  101. data/doc/rdoc/files/lib/wee/pageless_rb.html +110 -0
  102. data/doc/rdoc/files/lib/wee/renderer/html/brushes_rb.html +1 -1
  103. data/doc/rdoc/files/lib/wee/renderer/html/canvas_rb.html +8 -1
  104. data/doc/rdoc/files/lib/wee/request_rb.html +1 -1
  105. data/doc/rdoc/files/lib/wee/response_rb.html +1 -1
  106. data/doc/rdoc/files/lib/wee/session_rb.html +1 -1
  107. data/doc/rdoc/files/lib/wee/skeleton/og/components/main_rb.html +101 -0
  108. data/doc/rdoc/files/lib/wee/skeleton/og/conf/db_rb.html +114 -0
  109. data/doc/rdoc/files/lib/wee/skeleton/og/models/recipe_rb.html +101 -0
  110. data/doc/rdoc/files/lib/wee/skeleton/og/run_rb.html +115 -0
  111. data/doc/rdoc/files/lib/wee/skeleton/simple/components/main_rb.html +101 -0
  112. data/doc/rdoc/files/lib/wee/skeleton/simple/run_rb.html +111 -0
  113. data/doc/rdoc/files/lib/wee/template_rb.html +101 -0
  114. data/doc/rdoc/files/lib/wee/utils/autoreload_rb.html +1 -1
  115. data/doc/rdoc/files/lib/wee/utils/helper_rb.html +1 -1
  116. data/doc/rdoc/files/lib/wee_rb.html +4 -2
  117. data/doc/rdoc/fr_class_index.html +8 -4
  118. data/doc/rdoc/fr_file_index.html +17 -1
  119. data/doc/rdoc/fr_method_index.html +312 -267
  120. data/examples/live-update.rb +1 -1
  121. data/install.rb +14 -0
  122. data/lib/wee.rb +6 -2
  123. data/lib/wee/adaptors/webrick.rb +17 -5
  124. data/lib/wee/application.rb +2 -1
  125. data/lib/wee/continuation/session.rb +1 -146
  126. data/lib/wee/core/callback.rb +11 -5
  127. data/lib/wee/core/component.rb +14 -10
  128. data/lib/wee/databases/og.rb +3 -113
  129. data/lib/wee/databases/og/application.rb +3 -0
  130. data/lib/wee/databases/og/old_scaffolder.rb +98 -0
  131. data/lib/wee/databases/og/scaffolder.rb +174 -0
  132. data/lib/wee/databases/og/session.rb +9 -0
  133. data/lib/wee/idgen/md5.rb +21 -0
  134. data/lib/wee/{idgen.rb → idgen/simple.rb} +2 -4
  135. data/lib/wee/pageless.rb +3 -0
  136. data/lib/wee/pageless/application.rb +9 -0
  137. data/lib/wee/pageless/request.rb +15 -0
  138. data/lib/wee/pageless/session.rb +89 -0
  139. data/lib/wee/renderer/html/brushes.rb +100 -115
  140. data/lib/wee/renderer/html/canvas.rb +32 -2
  141. data/lib/wee/request.rb +36 -24
  142. data/lib/wee/response.rb +8 -1
  143. data/lib/wee/session.rb +13 -7
  144. data/lib/wee/skeleton/og/README +38 -0
  145. data/lib/wee/skeleton/og/components/main.rb +16 -0
  146. data/lib/wee/skeleton/og/conf/db.rb +8 -0
  147. data/lib/wee/skeleton/og/models/recipe.rb +5 -0
  148. data/lib/wee/skeleton/og/run.rb +23 -0
  149. data/lib/wee/skeleton/simple/README +32 -0
  150. data/lib/wee/skeleton/simple/components/main.rb +25 -0
  151. data/lib/wee/skeleton/simple/run.rb +12 -0
  152. data/lib/wee/template.rb +28 -0
  153. data/lib/wee/utils/autoreload.rb +29 -0
  154. data/lib/wee/utils/helper.rb +9 -5
  155. data/test/test_request.rb +4 -3
  156. data/wee.gemspec +3 -1
  157. metadata +91 -22
data/ChangeLog CHANGED
@@ -1,3 +1,135 @@
1
+ Sat Jan 29 19:06:12 CET 2005 Michael Neumann <mneumann@ntecs.de>
2
+
3
+ * Added ERB-templating. Example:
4
+
5
+ # file: ~/components/main.rb
6
+ class Test < Wee::Component
7
+
8
+ # use template '~/components/main.tpl'
9
+ template :render
10
+
11
+ # use template '~/components/main.tpl-buttons'
12
+ template :render_buttons
13
+ end
14
+
15
+ This allows you to use ERB-templates instead of the render_XXX
16
+ methods. You can also call render_XXX methods from ERB, back and
17
+ forth. The template file is relative to the file from which the
18
+ 'template :symbol' call is executed. The template method optionally
19
+ takes the two hash-parameters :file and :property.
20
+
21
+ * Added "Pageless" mode. In pageless mode, the URL displayed in your
22
+ browser always looks like "/app". The session id is stored as cookie
23
+ and there is no page_id, hence "pageless" mode. No backtracking is
24
+ performed! Example:
25
+
26
+ require 'wee/pageless'
27
+
28
+ app = Wee::Utils.app_for(YourMainComponent,
29
+ :session => Wee::PagelessSession,
30
+ :application => Wee::PagelessApplication)
31
+
32
+ Wee::WEBrickAdaptor.
33
+ request_class(Wee::PagelessRequest).
34
+ register('/app' => app).
35
+ start
36
+
37
+ * Wee::Session: use #set_response, so that subclass of Wee::Session can more
38
+ easily modify a response (e.g. add cookies or HTTP headers).
39
+
40
+ Sat Jan 29 17:08:54 CET 2005 Michael Neumann <mneumann@ntecs.de>
41
+
42
+ * Wee::LiteralMethodCallback and Component#call: Additional arguments
43
+ are now prepended instead of appended. Example:
44
+
45
+ call MessageBox.new('msg'), :confirm, 1
46
+
47
+ def confirm(one, msgbox_result)
48
+ end
49
+
50
+ * Added named callbacks. Example:
51
+
52
+ r.anchor.named_callback('test') { ... }
53
+
54
+ will use 'test' as callback_id instead of a generic one.
55
+
56
+ * Methods ImageTag#src_for and GenericTagBrush#css_class_for no more
57
+ prepend 'img.' or 'css.' in front of the property name.
58
+
59
+ * Refactored wee/renderer/html/brushes.rb. Removed InputCallbackMixin,
60
+ ActionCallbackMixin and ActionURLCallbackMixin modules. Instead the
61
+ GenericTagBrush has methods __input_callback, __action_callback etc.
62
+ which are aliased in the corresponding Brush classes. Also made the
63
+ SelectList callback marshallable.
64
+
65
+ Fri Jan 28 02:42:53 CET 2005 Michael Neumann <mneumann@ntecs.de>
66
+
67
+ * Method Wee::WEBrickAdaptor.request_class added. This allows you to
68
+ use a custom request class for your application or even a different
69
+ one for each registered application. Also added cookie support.
70
+
71
+ * Added method Wee::Utils.autoreload_glob which is faster than
72
+ #autoreload as it does not traverse the whole LOAD_PATH.
73
+
74
+ * Wee::Response: added cookies
75
+
76
+ Fri Jan 28 02:32:30 CET 2005 Michael Neumann <mneumann@ntecs.de>
77
+
78
+ * Removed method Wee::Session#current_page and replaced it by
79
+ #current_callbacks.
80
+
81
+ * Wee::Session no longer applies a snapshot if the snapshot equals the current
82
+ state of the components tree
83
+
84
+ * removed duplicate code from continuation/session.rb
85
+
86
+ Fri Jan 28 02:10:31 CET 2005 Michael Neumann <mneumann@ntecs.de>
87
+
88
+ * added 'wee' binary which generates a sample application and
89
+ recommended directory structure for you (similar to the 'rails' command).
90
+
91
+ Fri Jan 28 00:22:21 CET 2005 Michael Neumann <mneumann@ntecs.de>
92
+
93
+ * Method Wee::Utils.app_for: Removed the id_seed option. Use id_gen
94
+ instead, which expects a IdGenerator object (default is now the much more
95
+ secure Md5IdGenerator).
96
+
97
+ * Wee::Request: Refactored a lot. Use =/ instead of @ as delimeter for
98
+ the request_handler_id/page_id part ('@' looks ugly in Konqueror, as
99
+ it is displayed as '%40')
100
+
101
+ * Wee::Application: Don't send a RedirectResponse when no
102
+ request_handler_id was given. This wasn't neccessary and would
103
+ break when introducing cookies.
104
+
105
+ Fri Jan 28 00:07:52 CET 2005 Michael Neumann <mneumann@ntecs.de>
106
+
107
+ * renamed wee/idgen.rb to wee/idgen/simple.rb and
108
+ wee/md5_idgen.rb to wee/idgen/md5.rb
109
+
110
+ Fri Jan 28 00:04:46 CET 2005 Michael Neumann <mneumann@ntecs.de>
111
+
112
+ * added Md5IdGenerator, removed method #current from SimpleIdGenerator
113
+
114
+ Thu Jan 27 18:45:44 CET 2005 Michael Neumann <mneumann@ntecs.de>
115
+
116
+ * Implemented a new OgScaffolder, which now is more like Rails one.
117
+
118
+ Thu Jan 27 15:23:59 CET 2005 Michael Neumann <mneumann@ntecs.de>
119
+
120
+ * Component#add_decoration returns now self. Example where this is
121
+ useful:
122
+
123
+ app = Wee::Utils.app_for {
124
+ HelloWorld.new.add_decoration(Wee::PageDecoration.new("Hello World"))
125
+ }
126
+
127
+ * add non-Rubygems way to install Wee: install.rb
128
+
129
+ --------------------------------------------------------------------
130
+ TAGGED 0.5.0
131
+ --------------------------------------------------------------------
132
+
1
133
  Wed Jan 26 20:22:55 CET 2005 Michael Neumann <mneumann@ntecs.de>
2
134
 
3
135
  * Raised version up to 0.5.0 (nearing a release)
data/INSTALL CHANGED
@@ -1,7 +1,17 @@
1
- = Installation
1
+ = Installation without Rubygems
2
+
3
+ Simply run:
4
+
5
+ ruby install.rb
6
+
7
+ = Installation with Rubygems
2
8
 
3
9
  1. Download and Install RubyGems: http://rubygems.rubyforge.org
4
10
 
5
- 2. Install Wee: <tt>gem install wee</tt>
11
+ 2. Install Wee:
12
+
13
+ gem install wee
14
+
15
+ 3. Set environment variable (required to load RubyGems):
6
16
 
7
- 3. Set environment variable (required to load RubyGems): <tt>export RUBYOPT=-rubygems</tt>
17
+ export RUBYOPT=-rubygems
data/README CHANGED
@@ -16,9 +16,9 @@ Nevertheless I wouldn't use it yet for mission-critical applications ;-)
16
16
  Known Bugs:
17
17
 
18
18
  * Using continuations might leak memory, at least they did in the past. The
19
- latest memory stress-test has not showed up any memory problems, but since I
20
- haven't changed anything at the continuation implementation, I can't say for
21
- sure whether the problem has been fixed or not.
19
+ latest memory stress-test has not showed up any memory problems, but since I
20
+ haven't changed anything at the continuation implementation, I can't say for
21
+ sure whether the problem has been fixed or not.
22
22
 
23
23
  == Introduction
24
24
 
data/Rakefile CHANGED
@@ -21,11 +21,15 @@ task :package do
21
21
  sh 'gem build wee.gemspec'
22
22
  end
23
23
 
24
- task :local_install => [:package] do
24
+ task :gem_install => [:package] do
25
25
  sh '(yes | gem uninstall wee) || true'
26
26
  sh 'gem install --no-rdoc wee-*.gem'
27
27
  end
28
28
 
29
+ task :install do
30
+ ruby 'install.rb'
31
+ end
32
+
29
33
  task :clean => [:clobber_rdoc]
30
34
 
31
35
  task :default => [:test, :rdoc, :clean]
data/bin/wee ADDED
@@ -0,0 +1,100 @@
1
+ #!/usr/bin/env ruby
2
+ require 'wee'
3
+
4
+ def usage
5
+ puts <<-USAGE
6
+
7
+ NAME
8
+ wee - creates a new Wee installation
9
+
10
+ SYNOPSIS
11
+ wee create [full path]
12
+ wee create-simple [full path]
13
+ wee create-og [full path]
14
+
15
+ DESCRIPTION
16
+ This will create a suggested directory structure as well as some
17
+ files to get you quickly started running a simple Wee application.
18
+ For further information have a look at the README file in the
19
+ created directory.
20
+
21
+ "create-simple" is an alias for "create". "create-og" creates a
22
+ simple Wee application that uses a database and the
23
+ Og (ObjectGraph) OR mapper.
24
+
25
+
26
+ EXAMPLE
27
+
28
+ wee create ~/my-wee-project
29
+
30
+ This will generate a new Wee installation in the ~/my-wee-project
31
+ folder.
32
+ USAGE
33
+ exit 1
34
+ end
35
+
36
+ require 'ftools'
37
+
38
+ SKEL_DIR = File.join(Wee::LibPath, 'wee', 'skeleton')
39
+
40
+ def run
41
+ case command = ARGV[0] || usage()
42
+ when 'create', 'create-simple'
43
+ path = ARGV[1] || usage()
44
+ path = File.expand_path(path)
45
+
46
+ if File.exists?(path)
47
+ STDERR.puts "ERROR: Path #{ path } already exists! Aborting!"
48
+ exit 1
49
+ end
50
+
51
+ src = File.join(SKEL_DIR, 'simple')
52
+
53
+ File.makedirs path
54
+ File.makedirs File.join(path, 'components')
55
+
56
+ File.copy File.join(src, 'run.rb'), path, true
57
+ File.copy File.join(src, 'README'), path, true
58
+ File.copy File.join(src, 'components', 'main.rb'), File.join(path, 'components'), true
59
+
60
+ when 'create-og'
61
+
62
+ path = ARGV[1] || usage()
63
+ path = File.expand_path(path)
64
+
65
+ if File.exists?(path)
66
+ STDERR.puts "ERROR: Path #{ path } already exists! Aborting!"
67
+ exit 1
68
+ end
69
+
70
+ src = File.join(SKEL_DIR, 'og')
71
+
72
+ File.makedirs path
73
+ File.makedirs File.join(path, 'components')
74
+ File.makedirs File.join(path, 'models')
75
+ File.makedirs File.join(path, 'conf')
76
+
77
+ File.copy File.join(src, 'run.rb'), path, true
78
+ File.copy File.join(src, 'README'), path, true
79
+ File.copy File.join(src, 'components', 'main.rb'), File.join(path, 'components'), true
80
+ File.copy File.join(src, 'models', 'recipe.rb'), File.join(path, 'models'), true
81
+
82
+ cfg = File.read(File.join(src, 'conf', 'db.rb'))
83
+ cfg = cfg.gsub('%%db%%', get_username).gsub('%%user%%', get_username)
84
+ File.open(File.join(path, 'conf', 'db.rb'), 'w+') {|f| f << cfg }
85
+
86
+ else
87
+ usage()
88
+ end
89
+ end
90
+
91
+ def get_username
92
+ begin
93
+ require 'etc'
94
+ Etc.getlogin
95
+ rescue LoadError
96
+ 'xxx'
97
+ end
98
+ end
99
+
100
+ run()
@@ -88,8 +88,8 @@
88
88
  <h3 class="section-bar">Methods</h3>
89
89
 
90
90
  <div class="name-list">
91
- <a href="#M000006">restore_snapshot</a>&nbsp;&nbsp;
92
- <a href="#M000005">take_snapshot</a>&nbsp;&nbsp;
91
+ <a href="#M000011">restore_snapshot</a>&nbsp;&nbsp;
92
+ <a href="#M000010">take_snapshot</a>&nbsp;&nbsp;
93
93
  </div>
94
94
  </div>
95
95
 
@@ -111,19 +111,19 @@
111
111
  <div id="methods">
112
112
  <h3 class="section-bar">Public Instance methods</h3>
113
113
 
114
- <div id="method-M000006" class="method-detail">
115
- <a name="M000006"></a>
114
+ <div id="method-M000011" class="method-detail">
115
+ <a name="M000011"></a>
116
116
 
117
117
  <div class="method-heading">
118
- <a href="#M000006" class="method-signature">
118
+ <a href="#M000011" class="method-signature">
119
119
  <span class="method-name">restore_snapshot</span><span class="method-args">(snap)</span>
120
120
  </a>
121
121
  </div>
122
122
 
123
123
  <div class="method-description">
124
124
  <p><a class="source-toggle" href="#"
125
- onclick="toggleCode('M000006-source');return false;">[Source]</a></p>
126
- <div class="method-source-code" id="M000006-source">
125
+ onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
126
+ <div class="method-source-code" id="M000011-source">
127
127
  <pre>
128
128
  <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 22</span>
129
129
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">restore_snapshot</span>(<span class="ruby-identifier">snap</span>)
@@ -134,19 +134,19 @@
134
134
  </div>
135
135
  </div>
136
136
 
137
- <div id="method-M000005" class="method-detail">
138
- <a name="M000005"></a>
137
+ <div id="method-M000010" class="method-detail">
138
+ <a name="M000010"></a>
139
139
 
140
140
  <div class="method-heading">
141
- <a href="#M000005" class="method-signature">
141
+ <a href="#M000010" class="method-signature">
142
142
  <span class="method-name">take_snapshot</span><span class="method-args">()</span>
143
143
  </a>
144
144
  </div>
145
145
 
146
146
  <div class="method-description">
147
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">
148
+ onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
149
+ <div class="method-source-code" id="M000010-source">
150
150
  <pre>
151
151
  <span class="ruby-comment cmt"># File lib/wee/snapshot_ext.rb, line 18</span>
152
152
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">take_snapshot</span>
@@ -101,13 +101,13 @@ protocol that the <em>store</em> must understand is:
101
101
  <h3 class="section-bar">Methods</h3>
102
102
 
103
103
  <div class="name-list">
104
- <a href="#M000012">[]</a>&nbsp;&nbsp;
105
- <a href="#M000013">[]=</a>&nbsp;&nbsp;
106
- <a href="#M000009">delete</a>&nbsp;&nbsp;
107
- <a href="#M000010">fetch</a>&nbsp;&nbsp;
108
- <a href="#M000008">has_key?</a>&nbsp;&nbsp;
109
- <a href="#M000007">new</a>&nbsp;&nbsp;
110
- <a href="#M000011">store</a>&nbsp;&nbsp;
104
+ <a href="#M000017">[]</a>&nbsp;&nbsp;
105
+ <a href="#M000018">[]=</a>&nbsp;&nbsp;
106
+ <a href="#M000014">delete</a>&nbsp;&nbsp;
107
+ <a href="#M000015">fetch</a>&nbsp;&nbsp;
108
+ <a href="#M000013">has_key?</a>&nbsp;&nbsp;
109
+ <a href="#M000012">new</a>&nbsp;&nbsp;
110
+ <a href="#M000016">store</a>&nbsp;&nbsp;
111
111
  </div>
112
112
  </div>
113
113
 
@@ -129,19 +129,19 @@ protocol that the <em>store</em> must understand is:
129
129
  <div id="methods">
130
130
  <h3 class="section-bar">Public Class methods</h3>
131
131
 
132
- <div id="method-M000007" class="method-detail">
133
- <a name="M000007"></a>
132
+ <div id="method-M000012" class="method-detail">
133
+ <a name="M000012"></a>
134
134
 
135
135
  <div class="method-heading">
136
- <a href="#M000007" class="method-signature">
136
+ <a href="#M000012" class="method-signature">
137
137
  <span class="method-name">new</span><span class="method-args">(strategy, store=Hash.new, store_on_update=false)</span>
138
138
  </a>
139
139
  </div>
140
140
 
141
141
  <div class="method-description">
142
142
  <p><a class="source-toggle" href="#"
143
- onclick="toggleCode('M000007-source');return false;">[Source]</a></p>
144
- <div class="method-source-code" id="M000007-source">
143
+ onclick="toggleCode('M000012-source');return false;">[Source]</a></p>
144
+ <div class="method-source-code" id="M000012-source">
145
145
  <pre>
146
146
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 114</span>
147
147
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">strategy</span>, <span class="ruby-identifier">store</span>=<span class="ruby-constant">Hash</span>.<span class="ruby-identifier">new</span>, <span class="ruby-identifier">store_on_update</span>=<span class="ruby-keyword kw">false</span>)
@@ -156,8 +156,8 @@ protocol that the <em>store</em> must understand is:
156
156
 
157
157
  <h3 class="section-bar">Public Instance methods</h3>
158
158
 
159
- <div id="method-M000012" class="method-detail">
160
- <a name="M000012"></a>
159
+ <div id="method-M000017" class="method-detail">
160
+ <a name="M000017"></a>
161
161
 
162
162
  <div class="method-heading">
163
163
  <span class="method-name">[]</span><span class="method-args">(key, default_value=nil)</span>
@@ -165,13 +165,13 @@ protocol that the <em>store</em> must understand is:
165
165
 
166
166
  <div class="method-description">
167
167
  <p>
168
- Alias for <a href="StorageCache.html#M000010">fetch</a>
168
+ Alias for <a href="StorageCache.html#M000015">fetch</a>
169
169
  </p>
170
170
  </div>
171
171
  </div>
172
172
 
173
- <div id="method-M000013" class="method-detail">
174
- <a name="M000013"></a>
173
+ <div id="method-M000018" class="method-detail">
174
+ <a name="M000018"></a>
175
175
 
176
176
  <div class="method-heading">
177
177
  <span class="method-name">[]=</span><span class="method-args">(key, value)</span>
@@ -179,24 +179,24 @@ Alias for <a href="StorageCache.html#M000010">fetch</a>
179
179
 
180
180
  <div class="method-description">
181
181
  <p>
182
- Alias for <a href="StorageCache.html#M000011">store</a>
182
+ Alias for <a href="StorageCache.html#M000016">store</a>
183
183
  </p>
184
184
  </div>
185
185
  </div>
186
186
 
187
- <div id="method-M000009" class="method-detail">
188
- <a name="M000009"></a>
187
+ <div id="method-M000014" class="method-detail">
188
+ <a name="M000014"></a>
189
189
 
190
190
  <div class="method-heading">
191
- <a href="#M000009" class="method-signature">
191
+ <a href="#M000014" class="method-signature">
192
192
  <span class="method-name">delete</span><span class="method-args">(key)</span>
193
193
  </a>
194
194
  </div>
195
195
 
196
196
  <div class="method-description">
197
197
  <p><a class="source-toggle" href="#"
198
- onclick="toggleCode('M000009-source');return false;">[Source]</a></p>
199
- <div class="method-source-code" id="M000009-source">
198
+ onclick="toggleCode('M000014-source');return false;">[Source]</a></p>
199
+ <div class="method-source-code" id="M000014-source">
200
200
  <pre>
201
201
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 124</span>
202
202
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>)
@@ -213,19 +213,19 @@ Alias for <a href="StorageCache.html#M000011">store</a>
213
213
  </div>
214
214
  </div>
215
215
 
216
- <div id="method-M000010" class="method-detail">
217
- <a name="M000010"></a>
216
+ <div id="method-M000015" class="method-detail">
217
+ <a name="M000015"></a>
218
218
 
219
219
  <div class="method-heading">
220
- <a href="#M000010" class="method-signature">
220
+ <a href="#M000015" class="method-signature">
221
221
  <span class="method-name">fetch</span><span class="method-args">(key, default_value=nil)</span>
222
222
  </a>
223
223
  </div>
224
224
 
225
225
  <div class="method-description">
226
226
  <p><a class="source-toggle" href="#"
227
- onclick="toggleCode('M000010-source');return false;">[Source]</a></p>
228
- <div class="method-source-code" id="M000010-source">
227
+ onclick="toggleCode('M000015-source');return false;">[Source]</a></p>
228
+ <div class="method-source-code" id="M000015-source">
229
229
  <pre>
230
230
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 134</span>
231
231
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">fetch</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">default_value</span>=<span class="ruby-keyword kw">nil</span>)
@@ -243,19 +243,19 @@ Alias for <a href="StorageCache.html#M000011">store</a>
243
243
  </div>
244
244
  </div>
245
245
 
246
- <div id="method-M000008" class="method-detail">
247
- <a name="M000008"></a>
246
+ <div id="method-M000013" class="method-detail">
247
+ <a name="M000013"></a>
248
248
 
249
249
  <div class="method-heading">
250
- <a href="#M000008" class="method-signature">
250
+ <a href="#M000013" class="method-signature">
251
251
  <span class="method-name">has_key?</span><span class="method-args">(key)</span>
252
252
  </a>
253
253
  </div>
254
254
 
255
255
  <div class="method-description">
256
256
  <p><a class="source-toggle" href="#"
257
- onclick="toggleCode('M000008-source');return false;">[Source]</a></p>
258
- <div class="method-source-code" id="M000008-source">
257
+ onclick="toggleCode('M000013-source');return false;">[Source]</a></p>
258
+ <div class="method-source-code" id="M000013-source">
259
259
  <pre>
260
260
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 120</span>
261
261
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">has_key?</span>(<span class="ruby-identifier">key</span>)
@@ -266,19 +266,19 @@ Alias for <a href="StorageCache.html#M000011">store</a>
266
266
  </div>
267
267
  </div>
268
268
 
269
- <div id="method-M000011" class="method-detail">
270
- <a name="M000011"></a>
269
+ <div id="method-M000016" class="method-detail">
270
+ <a name="M000016"></a>
271
271
 
272
272
  <div class="method-heading">
273
- <a href="#M000011" class="method-signature">
273
+ <a href="#M000016" class="method-signature">
274
274
  <span class="method-name">store</span><span class="method-args">(key, value)</span>
275
275
  </a>
276
276
  </div>
277
277
 
278
278
  <div class="method-description">
279
279
  <p><a class="source-toggle" href="#"
280
- onclick="toggleCode('M000011-source');return false;">[Source]</a></p>
281
- <div class="method-source-code" id="M000011-source">
280
+ onclick="toggleCode('M000016-source');return false;">[Source]</a></p>
281
+ <div class="method-source-code" id="M000016-source">
282
282
  <pre>
283
283
  <span class="ruby-comment cmt"># File lib/cache/cache.rb, line 145</span>
284
284
  <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">store</span>(<span class="ruby-identifier">key</span>, <span class="ruby-identifier">value</span>)