eymiha_util 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/gem_package.rb +1 -1
- data/html/classes/Envelope.html +47 -47
- data/html/classes/Envelope.src/M000016.html +5 -5
- data/html/classes/Envelope.src/M000017.html +5 -21
- data/html/classes/Envelope.src/M000018.html +21 -5
- data/html/classes/Envelope.src/M000019.html +4 -4
- data/html/classes/Envelope.src/M000020.html +5 -12
- data/html/classes/Envelope.src/M000021.html +26 -0
- data/html/classes/Envelope.src/{M000022.html → M000023.html} +0 -0
- data/html/classes/ForwardReference.html +22 -13
- data/html/classes/ForwardReference.src/M000024.html +7 -4
- data/html/classes/{ForwardReferencing.src → ForwardReference.src}/M000025.html +4 -6
- data/html/classes/ForwardReferencing.html +46 -43
- data/html/classes/ForwardReferencing.src/M000026.html +6 -6
- data/html/classes/ForwardReferencing.src/M000027.html +6 -6
- data/html/classes/ForwardReferencing.src/M000028.html +6 -14
- data/html/classes/ForwardReferencing.src/M000029.html +18 -4
- data/html/classes/ForwardReferencing.src/M000030.html +4 -11
- data/html/classes/ForwardReferencing.src/M000031.html +11 -4
- data/html/classes/ForwardReferencing.src/M000032.html +4 -4
- data/html/classes/ForwardReferencing.src/M000033.html +18 -0
- data/html/classes/Histogram.html +60 -60
- data/html/classes/Histogram.src/M000007.html +5 -7
- data/html/classes/Histogram.src/M000008.html +7 -23
- data/html/classes/Histogram.src/M000009.html +23 -4
- data/html/classes/Histogram.src/M000010.html +4 -6
- data/html/classes/Histogram.src/M000011.html +4 -4
- data/html/classes/Histogram.src/M000012.html +4 -4
- data/html/classes/Histogram.src/M000013.html +4 -4
- data/html/classes/Histogram.src/M000014.html +6 -10
- data/html/classes/Histogram.src/M000015.html +24 -0
- data/html/classes/MethodicHash.html +24 -2
- data/html/classes/MethodicHash.src/M000005.html +8 -8
- data/html/classes/MethodicHash.src/M000006.html +23 -0
- data/html/created.rid +1 -1
- data/html/files/lib/forward_referencing_rb.html +1 -1
- data/html/files/lib/methodic_hash_rb.html +1 -1
- data/html/fr_method_index.html +29 -28
- data/lib/forward_referencing.rb +21 -8
- data/lib/methodic_hash.rb +13 -0
- data/test/tc_methodic_hash.rb +47 -1
- metadata +8 -7
- data/html/classes/Envelope.src/M000015.html +0 -19
- data/html/classes/ForwardReference.src/M000023.html +0 -20
- data/html/classes/Histogram.src/M000006.html +0 -19
@@ -5,18 +5,18 @@
|
|
5
5
|
|
6
6
|
<html>
|
7
7
|
<head>
|
8
|
-
<title>
|
8
|
+
<title>delete (MethodicHash)</title>
|
9
9
|
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
10
|
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
11
|
</head>
|
12
12
|
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/methodic_hash.rb, line
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">
|
15
|
-
<span class="ruby-identifier">
|
16
|
-
<span class="ruby-keyword kw">
|
17
|
-
<span class="ruby-keyword kw">
|
18
|
-
|
19
|
-
<span class="ruby-keyword kw">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/methodic_hash.rb, line 46</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">delete</span>(<span class="ruby-identifier">key</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
15
|
+
<span class="ruby-identifier">values</span> = [<span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_s</span>, <span class="ruby-identifier">key</span>.<span class="ruby-identifier">to_sym</span>].<span class="ruby-identifier">collect</span> {<span class="ruby-operator">|</span><span class="ruby-identifier">k</span><span class="ruby-operator">|</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">k</span>){ <span class="ruby-keyword kw">nil</span> } }.<span class="ruby-identifier">compact</span>
|
16
|
+
<span class="ruby-keyword kw">case</span> <span class="ruby-identifier">values</span>.<span class="ruby-identifier">size</span>
|
17
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">0</span> <span class="ruby-keyword kw">then</span> <span class="ruby-keyword kw">super</span>(<span class="ruby-identifier">key</span>,<span class="ruby-operator">&</span><span class="ruby-identifier">block</span>)
|
18
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">1</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">values</span>[<span class="ruby-value">0</span>]
|
19
|
+
<span class="ruby-keyword kw">when</span> <span class="ruby-value">2</span> <span class="ruby-keyword kw">then</span> <span class="ruby-identifier">values</span>
|
20
20
|
<span class="ruby-keyword kw">end</span>
|
21
21
|
<span class="ruby-keyword kw">end</span></pre>
|
22
22
|
</body>
|
@@ -0,0 +1,23 @@
|
|
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>
|
7
|
+
<head>
|
8
|
+
<title>method_missing (MethodicHash)</title>
|
9
|
+
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
+
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
+
</head>
|
12
|
+
<body class="standalone-code">
|
13
|
+
<pre><span class="ruby-comment cmt"># File lib/methodic_hash.rb, line 57</span>
|
14
|
+
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">method_missing</span>(<span class="ruby-identifier">method</span>,<span class="ruby-operator">*</span><span class="ruby-identifier">args</span>)
|
15
|
+
<span class="ruby-identifier">string</span> = <span class="ruby-identifier">method</span>.<span class="ruby-identifier">to_s</span>
|
16
|
+
<span class="ruby-keyword kw">if</span> <span class="ruby-identifier">string</span>[<span class="ruby-identifier">string</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>,<span class="ruby-value">1</span>] <span class="ruby-operator">==</span> <span class="ruby-value str">'='</span>
|
17
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">string</span>[<span class="ruby-value">0</span>,<span class="ruby-identifier">string</span>.<span class="ruby-identifier">length</span><span class="ruby-operator">-</span><span class="ruby-value">1</span>].<span class="ruby-identifier">to_sym</span>] = <span class="ruby-identifier">args</span>[<span class="ruby-value">0</span>]
|
18
|
+
<span class="ruby-keyword kw">else</span>
|
19
|
+
<span class="ruby-keyword kw">self</span>[<span class="ruby-identifier">method</span>]
|
20
|
+
<span class="ruby-keyword kw">end</span>
|
21
|
+
<span class="ruby-keyword kw">end</span></pre>
|
22
|
+
</body>
|
23
|
+
</html>
|
data/html/created.rid
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
Sun, 01 Jul 2007 15:24:09 -0400
|
data/html/fr_method_index.html
CHANGED
@@ -20,38 +20,39 @@
|
|
20
20
|
<div id="index">
|
21
21
|
<h1 class="section-bar">Methods</h1>
|
22
22
|
<div id="index-entries">
|
23
|
-
<a href="classes/Histogram.html#
|
24
|
-
<a href="classes/Histogram.html#
|
25
|
-
<a href="classes/Histogram.html#
|
26
|
-
<a href="classes/Envelope.html#
|
27
|
-
<a href="classes/Histogram.html#
|
28
|
-
<a href="classes/Histogram.html#
|
23
|
+
<a href="classes/Histogram.html#M000014">< (Histogram)</a><br />
|
24
|
+
<a href="classes/Histogram.html#M000013"><= (Histogram)</a><br />
|
25
|
+
<a href="classes/Histogram.html#M000015">== (Histogram)</a><br />
|
26
|
+
<a href="classes/Envelope.html#M000022">=== (Envelope)</a><br />
|
27
|
+
<a href="classes/Histogram.html#M000012">> (Histogram)</a><br />
|
28
|
+
<a href="classes/Histogram.html#M000011">>= (Histogram)</a><br />
|
29
29
|
<a href="classes/MethodicHash.html#M000004">[] (MethodicHash)</a><br />
|
30
|
-
<a href="classes/
|
31
|
-
<a href="classes/
|
32
|
-
<a href="classes/Envelope.html#
|
33
|
-
<a href="classes/ForwardReferencing.html#
|
34
|
-
<a href="classes/Histogram.html#
|
35
|
-
<a href="classes/ForwardReferencing.html#
|
36
|
-
<a href="classes/
|
37
|
-
<a href="classes/ForwardReferencing.html#
|
38
|
-
<a href="classes/ForwardReferencing.html#
|
39
|
-
<a href="classes/
|
40
|
-
<a href="classes/
|
41
|
-
<a href="classes/
|
42
|
-
<a href="classes/
|
30
|
+
<a href="classes/Envelope.html#M000018">add (Envelope)</a><br />
|
31
|
+
<a href="classes/Histogram.html#M000009">add (Histogram)</a><br />
|
32
|
+
<a href="classes/Envelope.html#M000021">contains? (Envelope)</a><br />
|
33
|
+
<a href="classes/ForwardReferencing.html#M000030">continue_forward_reference_resolution (ForwardReferencing)</a><br />
|
34
|
+
<a href="classes/Histogram.html#M000008">count (Histogram)</a><br />
|
35
|
+
<a href="classes/ForwardReferencing.html#M000027">create_forward_reference (ForwardReferencing)</a><br />
|
36
|
+
<a href="classes/MethodicHash.html#M000005">delete (MethodicHash)</a><br />
|
37
|
+
<a href="classes/ForwardReferencing.html#M000031">forward_reference_dependencies (ForwardReferencing)</a><br />
|
38
|
+
<a href="classes/ForwardReferencing.html#M000033">forward_references_remaining (ForwardReferencing)</a><br />
|
39
|
+
<a href="classes/ForwardReferencing.html#M000032">forward_references_to_s (ForwardReferencing)</a><br />
|
40
|
+
<a href="classes/Envelope.html#M000019">high (Envelope)</a><br />
|
41
|
+
<a href="classes/Histogram.html#M000010">key_count (Histogram)</a><br />
|
42
|
+
<a href="classes/Envelope.html#M000020">low (Envelope)</a><br />
|
43
|
+
<a href="classes/MethodicHash.html#M000006">method_missing (MethodicHash)</a><br />
|
44
|
+
<a href="classes/Envelope.html#M000016">new (Envelope)</a><br />
|
43
45
|
<a href="classes/BaseEnvelope.html#M000003">new (BaseEnvelope)</a><br />
|
44
|
-
<a href="classes/Histogram.html#
|
45
|
-
<a href="classes/
|
46
|
-
<a href="classes/ForwardReference.html#M000023">new (ForwardReference)</a><br />
|
46
|
+
<a href="classes/Histogram.html#M000007">new (Histogram)</a><br />
|
47
|
+
<a href="classes/ForwardReference.html#M000024">new (ForwardReference)</a><br />
|
47
48
|
<a href="classes/BaseEnvelope.html#M000002">raise_no_compare (BaseEnvelope)</a><br />
|
48
49
|
<a href="classes/BaseEnvelope.html#M000001">raise_no_envelope (BaseEnvelope)</a><br />
|
49
|
-
<a href="classes/ForwardReferencing.html#
|
50
|
-
<a href="classes/ForwardReferencing.html#
|
51
|
-
<a href="classes/ForwardReferencing.html#
|
52
|
-
<a href="classes/Envelope.html#
|
53
|
-
<a href="classes/ForwardReference.html#
|
54
|
-
<a href="classes/Envelope.html#
|
50
|
+
<a href="classes/ForwardReferencing.html#M000028">remove_forward_reference (ForwardReferencing)</a><br />
|
51
|
+
<a href="classes/ForwardReferencing.html#M000029">resolve_forward_references (ForwardReferencing)</a><br />
|
52
|
+
<a href="classes/ForwardReferencing.html#M000026">start_forward_referencing (ForwardReferencing)</a><br />
|
53
|
+
<a href="classes/Envelope.html#M000023">to_range (Envelope)</a><br />
|
54
|
+
<a href="classes/ForwardReference.html#M000025">to_s (ForwardReference)</a><br />
|
55
|
+
<a href="classes/Envelope.html#M000017">to_s (Envelope)</a><br />
|
55
56
|
</div>
|
56
57
|
</div>
|
57
58
|
</body>
|
data/lib/forward_referencing.rb
CHANGED
@@ -24,8 +24,8 @@ module ForwardReferencing
|
|
24
24
|
# To be called when a section of code that could contain a forward reference
|
25
25
|
# is entered. The method returns a newly created ForwardReference with the
|
26
26
|
# given dependency that can be jumped to during resolution.
|
27
|
-
def create_forward_reference
|
28
|
-
forward_reference = ForwardReference.new
|
27
|
+
def create_forward_reference(dependency=nil,context=nil)
|
28
|
+
forward_reference = ForwardReference.new(dependency,context)
|
29
29
|
@forward_references << forward_reference
|
30
30
|
forward_reference
|
31
31
|
end
|
@@ -34,7 +34,7 @@ module ForwardReferencing
|
|
34
34
|
# has successfully been reached. It is used to remove the ForwardReference
|
35
35
|
# that was created at the start of the section, and asserts that a
|
36
36
|
# resolution was made.
|
37
|
-
def remove_forward_reference
|
37
|
+
def remove_forward_reference(forward_reference=nil)
|
38
38
|
@forward_references.delete forward_reference if
|
39
39
|
(forward_reference.kind_of? ForwardReference)
|
40
40
|
@had_forward_reference_resolution = true
|
@@ -44,7 +44,10 @@ module ForwardReferencing
|
|
44
44
|
# to each in turn and retrying the code that caused it. This method repeats
|
45
45
|
# until nothing more is resolved. At that point unresolved forward reference
|
46
46
|
# may still exist, to be possibly resolved by another call to this method
|
47
|
-
# downstream.
|
47
|
+
# downstream. Prior to continuing to a forward reference, the
|
48
|
+
# establish_forward_reference context method is called with the context that
|
49
|
+
# was provided at the time the forward reference was created to give the
|
50
|
+
# receiver a chance to reset any transcient infromation.
|
48
51
|
def resolve_forward_references
|
49
52
|
forward_references = @forward_references
|
50
53
|
@forward_references = []
|
@@ -53,7 +56,11 @@ module ForwardReferencing
|
|
53
56
|
@forward_reference_resolver ||= callcc {|cont| cont} while
|
54
57
|
(@forward_reference_resolver == nil)
|
55
58
|
forward_reference = forward_references.shift
|
56
|
-
|
59
|
+
if forward_reference != nil
|
60
|
+
establish_forward_reference_context(forward_reference.context) if
|
61
|
+
respond_to?(:establish_forward_reference_context,true)
|
62
|
+
forward_reference.continuation.call
|
63
|
+
end
|
57
64
|
end
|
58
65
|
@forward_reference_resolver = nil
|
59
66
|
resolve_forward_references if @had_forward_reference_resolution
|
@@ -65,7 +72,7 @@ module ForwardReferencing
|
|
65
72
|
def continue_forward_reference_resolution
|
66
73
|
@forward_reference_resolver.call if @forward_reference_resolver
|
67
74
|
end
|
68
|
-
|
75
|
+
|
69
76
|
# Returns a hash of dependencies to arrays of the ForwardReferences that
|
70
77
|
# have them as dependencies.
|
71
78
|
def forward_reference_dependencies
|
@@ -123,11 +130,17 @@ class ForwardReference
|
|
123
130
|
# occurred.
|
124
131
|
attr_accessor :dependency
|
125
132
|
|
126
|
-
#
|
127
|
-
|
133
|
+
# Holds an arbitrary object that holds context that can be re-established
|
134
|
+
# to help resolve the forward reference.
|
135
|
+
attr_accessor :context
|
136
|
+
|
137
|
+
# Returns a new instance with a valid continuation, the given dependency
|
138
|
+
# and contextual information.
|
139
|
+
def initialize(dependency=nil,context=nil)
|
128
140
|
@continuation = nil
|
129
141
|
@continuation = callcc{|cont| cont} while (@continuation == nil)
|
130
142
|
@dependency = dependency
|
143
|
+
@context = context
|
131
144
|
end
|
132
145
|
|
133
146
|
# Returns a string indicating the current state of the ForwardReference.
|
data/lib/methodic_hash.rb
CHANGED
@@ -39,6 +39,19 @@ class MethodicHash < Hash
|
|
39
39
|
end
|
40
40
|
end
|
41
41
|
|
42
|
+
# Deletes and returns the key-value pairs from hash whose keys are equal to
|
43
|
+
# key.to_s or key.to_sym. If both key.to_s and key.to_sym are in the hash,
|
44
|
+
# then both values are returned in an Array, respectively. If neither key is
|
45
|
+
# found, the delete is deferred to the Hash.
|
46
|
+
def delete(key,&block)
|
47
|
+
values = [key.to_s, key.to_sym].collect {|k| super(k){ nil } }.compact
|
48
|
+
case values.size
|
49
|
+
when 0 then super(key,&block)
|
50
|
+
when 1 then values[0]
|
51
|
+
when 2 then values
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
42
55
|
# A missing method is assummed to be the assignment of a value of a key, or
|
43
56
|
# the lookup of a value with a key.
|
44
57
|
def method_missing(method,*args)
|
data/test/tc_methodic_hash.rb
CHANGED
@@ -31,6 +31,52 @@ class TC_MethodicHash < Test::Unit::TestCase
|
|
31
31
|
|
32
32
|
end
|
33
33
|
|
34
|
+
def test_remove
|
35
|
+
|
36
|
+
mh = MethodicHash.new
|
37
|
+
|
38
|
+
mh[:one] = 1
|
39
|
+
assert(mh.size == 1)
|
40
|
+
assert((mh.delete :one) == 1)
|
41
|
+
assert(mh.size == 0)
|
42
|
+
|
43
|
+
mh['two'] = 2
|
44
|
+
assert(mh.size == 1)
|
45
|
+
assert((mh.delete :two) == 2)
|
46
|
+
assert(mh.size == 0)
|
47
|
+
|
48
|
+
mh[:three] = 3
|
49
|
+
assert(mh.size == 1)
|
50
|
+
assert((mh.delete 'three') == 3)
|
51
|
+
assert(mh.size == 0)
|
52
|
+
|
53
|
+
mh['four'] = 4
|
54
|
+
assert(mh.size == 1)
|
55
|
+
assert((mh.delete 'four') == 4)
|
56
|
+
assert(mh.size == 0)
|
57
|
+
|
58
|
+
mh[:five] = 5
|
59
|
+
mh['five'] = 'v'
|
60
|
+
assert(mh.size == 2)
|
61
|
+
deleted = mh.delete :five
|
62
|
+
assert(deleted.index(5) != nil)
|
63
|
+
assert(deleted.index('v') != nil)
|
64
|
+
assert(mh.size == 0)
|
65
|
+
|
66
|
+
mh[:six] = 6
|
67
|
+
mh['six'] = 'vi'
|
68
|
+
assert(mh.size == 2)
|
69
|
+
deleted = mh.delete 'six'
|
70
|
+
assert(deleted.index(6) != nil)
|
71
|
+
assert(deleted.index('vi') != nil)
|
72
|
+
assert(mh.size == 0)
|
73
|
+
|
74
|
+
mh[:seven] = 7
|
75
|
+
assert(mh.size == 1)
|
76
|
+
assert((mh.delete 'eight') == nil)
|
77
|
+
assert((mh.delete('nine') {|key| "#{key} not found"}) == "nine not found")
|
78
|
+
assert(mh.size == 1)
|
79
|
+
|
80
|
+
end
|
34
81
|
|
35
|
-
|
36
82
|
end
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: eymiha_util
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.1.4
|
7
|
+
date: 2007-07-01 00:00:00 -04:00
|
8
8
|
summary: Eymiha general utility classes and methods
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -47,22 +47,21 @@ files:
|
|
47
47
|
- html/classes/BaseEnvelope.src/M000003.html
|
48
48
|
- html/classes/Envelope.html
|
49
49
|
- html/classes/Envelope.src
|
50
|
-
- html/classes/Envelope.src/M000015.html
|
51
50
|
- html/classes/Envelope.src/M000016.html
|
52
51
|
- html/classes/Envelope.src/M000017.html
|
53
52
|
- html/classes/Envelope.src/M000018.html
|
54
53
|
- html/classes/Envelope.src/M000019.html
|
55
54
|
- html/classes/Envelope.src/M000020.html
|
56
|
-
- html/classes/Envelope.src/
|
55
|
+
- html/classes/Envelope.src/M000021.html
|
56
|
+
- html/classes/Envelope.src/M000023.html
|
57
57
|
- html/classes/EnvelopeException.html
|
58
58
|
- html/classes/ForwardReference.html
|
59
59
|
- html/classes/ForwardReference.src
|
60
|
-
- html/classes/ForwardReference.src/M000023.html
|
61
60
|
- html/classes/ForwardReference.src/M000024.html
|
61
|
+
- html/classes/ForwardReference.src/M000025.html
|
62
62
|
- html/classes/ForwardReferencer.html
|
63
63
|
- html/classes/ForwardReferencing.html
|
64
64
|
- html/classes/ForwardReferencing.src
|
65
|
-
- html/classes/ForwardReferencing.src/M000025.html
|
66
65
|
- html/classes/ForwardReferencing.src/M000026.html
|
67
66
|
- html/classes/ForwardReferencing.src/M000027.html
|
68
67
|
- html/classes/ForwardReferencing.src/M000028.html
|
@@ -70,9 +69,9 @@ files:
|
|
70
69
|
- html/classes/ForwardReferencing.src/M000030.html
|
71
70
|
- html/classes/ForwardReferencing.src/M000031.html
|
72
71
|
- html/classes/ForwardReferencing.src/M000032.html
|
72
|
+
- html/classes/ForwardReferencing.src/M000033.html
|
73
73
|
- html/classes/Histogram.html
|
74
74
|
- html/classes/Histogram.src
|
75
|
-
- html/classes/Histogram.src/M000006.html
|
76
75
|
- html/classes/Histogram.src/M000007.html
|
77
76
|
- html/classes/Histogram.src/M000008.html
|
78
77
|
- html/classes/Histogram.src/M000009.html
|
@@ -81,11 +80,13 @@ files:
|
|
81
80
|
- html/classes/Histogram.src/M000012.html
|
82
81
|
- html/classes/Histogram.src/M000013.html
|
83
82
|
- html/classes/Histogram.src/M000014.html
|
83
|
+
- html/classes/Histogram.src/M000015.html
|
84
84
|
- html/classes/HistogramException.html
|
85
85
|
- html/classes/MethodicHash.html
|
86
86
|
- html/classes/MethodicHash.src
|
87
87
|
- html/classes/MethodicHash.src/M000004.html
|
88
88
|
- html/classes/MethodicHash.src/M000005.html
|
89
|
+
- html/classes/MethodicHash.src/M000006.html
|
89
90
|
- html/created.rid
|
90
91
|
- html/files
|
91
92
|
- html/files/lib
|
@@ -1,19 +0,0 @@
|
|
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>
|
7
|
-
<head>
|
8
|
-
<title>new (Envelope)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/envelope.rb, line 52</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">value</span>=<span class="ruby-keyword kw">nil</span>)
|
15
|
-
<span class="ruby-keyword kw">super</span>()
|
16
|
-
<span class="ruby-identifier">add</span>(<span class="ruby-identifier">value</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">value</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|
@@ -1,20 +0,0 @@
|
|
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>
|
7
|
-
<head>
|
8
|
-
<title>new (ForwardReference)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/forward_referencing.rb, line 127</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">dependency</span>)
|
15
|
-
<span class="ruby-ivar">@continuation</span> = <span class="ruby-keyword kw">nil</span>
|
16
|
-
<span class="ruby-ivar">@continuation</span> = <span class="ruby-identifier">callcc</span>{<span class="ruby-operator">|</span><span class="ruby-identifier">cont</span><span class="ruby-operator">|</span> <span class="ruby-identifier">cont</span>} <span class="ruby-keyword kw">while</span> (<span class="ruby-ivar">@continuation</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>)
|
17
|
-
<span class="ruby-ivar">@dependency</span> = <span class="ruby-identifier">dependency</span>
|
18
|
-
<span class="ruby-keyword kw">end</span></pre>
|
19
|
-
</body>
|
20
|
-
</html>
|
@@ -1,19 +0,0 @@
|
|
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>
|
7
|
-
<head>
|
8
|
-
<title>new (Histogram)</title>
|
9
|
-
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
|
10
|
-
<link rel="stylesheet" href="../.././rdoc-style.css" type="text/css" media="screen" />
|
11
|
-
</head>
|
12
|
-
<body class="standalone-code">
|
13
|
-
<pre><span class="ruby-comment cmt"># File lib/histogram.rb, line 17</span>
|
14
|
-
<span class="ruby-keyword kw">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">key</span>=<span class="ruby-keyword kw">nil</span>,<span class="ruby-identifier">number</span>=<span class="ruby-value">1</span>)
|
15
|
-
<span class="ruby-keyword kw">super</span>()
|
16
|
-
<span class="ruby-identifier">add</span>(<span class="ruby-identifier">key</span>,<span class="ruby-identifier">number</span>) <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">key</span> <span class="ruby-operator">==</span> <span class="ruby-keyword kw">nil</span>
|
17
|
-
<span class="ruby-keyword kw">end</span></pre>
|
18
|
-
</body>
|
19
|
-
</html>
|