fluid 1.0.0 → 1.0.1
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/History.txt +3 -0
- data/README.txt +2 -2
- data/Rakefile +4 -0
- data/homepage/index.html +12 -4
- data/lib/fluid.rb +1 -1
- metadata +1 -1
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -6,7 +6,7 @@ reversibly change the values of globals.
|
|
6
6
|
|
7
7
|
Here's an incredibly simple example:
|
8
8
|
|
9
|
-
require '
|
9
|
+
require 'fluid'
|
10
10
|
|
11
11
|
Fluid.let(:var, 1) {
|
12
12
|
puts Fluid.var # prints 1
|
@@ -17,7 +17,7 @@ Fluid.var is a "pseudovariable" that only exists within the block. What's
|
|
17
17
|
interesting about fluid variables is what "within the block" means.
|
18
18
|
Here's another example:
|
19
19
|
|
20
|
-
require '
|
20
|
+
require 'fluid'
|
21
21
|
|
22
22
|
def putter
|
23
23
|
puts Fluid.var
|
data/Rakefile
CHANGED
data/homepage/index.html
CHANGED
@@ -2,14 +2,22 @@
|
|
2
2
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
3
3
|
<head>
|
4
4
|
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
|
5
|
-
<title>
|
5
|
+
<title>Fluid (dynamically scoped) variables</title>
|
6
6
|
|
7
7
|
</head>
|
8
8
|
<body>
|
9
9
|
<h1>Fluid (dynamically scoped) variables</h1>
|
10
|
-
<
|
11
|
-
<p
|
12
|
-
|
10
|
+
<img src="example.png" style="float: right; border: 0; margin-left: 0.25in"/>
|
11
|
+
<p>Class Fluid provides dynamically scoped ("fluid") variables modeled
|
12
|
+
after those of Common Lisp. It also gives you a convenient way to
|
13
|
+
reversibly change the values of globals.
|
14
|
+
|
15
|
+
</p>
|
16
|
+
<p>Fluid variables are useful when you want to pass information among related classes and methods without passing arguments all over the place, but you also want something a little more controlled than globals. They're not useful all that often, but they come in handy once in a while.</p>
|
17
|
+
<p>The <a href="http://fluid.rubyforge.org/rdoc/" title="Fluid.rb documentation">documentation</a> (rdoc) gives more explanation and examples. </p>
|
18
|
+
<p><a href="http://rubyforge.org/frs/?group_id=4111" title="RubyForge: Fluid: Project Filelist">Download</a></p>
|
19
|
+
|
20
|
+
<p style="text-align: right">—<a href="mailto:marick@exampler.com">Brian Marick</a></p>
|
13
21
|
|
14
22
|
|
15
23
|
</body>
|
data/lib/fluid.rb
CHANGED