sexp_processor 3.0.2 → 3.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +6 -0
- data/Rakefile +0 -2
- data/lib/sexp.rb +7 -0
- data/lib/sexp_processor.rb +1 -1
- data/test/test_sexp.rb +12 -0
- metadata +5 -26
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -0
data/History.txt
CHANGED
data/Rakefile
CHANGED
data/lib/sexp.rb
CHANGED
@@ -177,6 +177,13 @@ class Sexp < Array # ZenTest FULL
|
|
177
177
|
end
|
178
178
|
end
|
179
179
|
|
180
|
+
##
|
181
|
+
# Returns the size of the sexp, flattened.
|
182
|
+
|
183
|
+
def mass
|
184
|
+
@mass ||= self.structure.flatten.size
|
185
|
+
end
|
186
|
+
|
180
187
|
##
|
181
188
|
# Returns the node named +node+, deleting it if +delete+ is true.
|
182
189
|
|
data/lib/sexp_processor.rb
CHANGED
data/test/test_sexp.rb
CHANGED
@@ -191,6 +191,18 @@ class TestSexp < SexpTestCase # ZenTest FULL
|
|
191
191
|
k.new(:a, k.new(:b)).inspect)
|
192
192
|
end
|
193
193
|
|
194
|
+
def test_mass
|
195
|
+
assert_equal 1, s(:a).mass
|
196
|
+
assert_equal 3, s(:a, s(:b), s(:c)).mass
|
197
|
+
|
198
|
+
s = s(:iter,
|
199
|
+
s(:call, nil, :a, s(:arglist, s(:lit, 1))),
|
200
|
+
s(:lasgn, :c),
|
201
|
+
s(:call, nil, :d, s(:arglist)))
|
202
|
+
|
203
|
+
assert_equal 7, s.mass
|
204
|
+
end
|
205
|
+
|
194
206
|
def test_method_missing
|
195
207
|
assert_nil @sexp.not_there
|
196
208
|
assert_equal s(:lit, 42), @basic_sexp.lit
|
metadata
CHANGED
@@ -1,36 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sexp_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|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epkcU13/rguI88wO6MrE0wi4ZqLQX+eZQFskJb/
|
27
|
-
w6x9W1ur8eR01s397LSMexySDBrJOh34cm2AlfKr/jokKCTwcM0OvVZnAutaovC0
|
28
|
-
l1SVZ0ecg88bsWHA0Yhh7NFxK1utWoIhtB6AFC/+trM0FQEB/jZkIS8SaNzn96Rl
|
29
|
-
n0sZEf77FLf5peR8TP/PtmIg7Cyqz23sLM4mCOoTGIy5OcZ8TdyiyINUHtb5ej/T
|
30
|
-
FBHgymkyj/AOSqKRIpXPhjC6
|
31
|
-
-----END CERTIFICATE-----
|
10
|
+
cert_chain: []
|
32
11
|
|
33
|
-
date: 2009-
|
12
|
+
date: 2009-08-14 00:00:00 -07:00
|
34
13
|
default_executable:
|
35
14
|
dependencies:
|
36
15
|
- !ruby/object:Gem::Dependency
|
@@ -41,7 +20,7 @@ dependencies:
|
|
41
20
|
requirements:
|
42
21
|
- - ">="
|
43
22
|
- !ruby/object:Gem::Version
|
44
|
-
version: 2.3.
|
23
|
+
version: 2.3.3
|
45
24
|
version:
|
46
25
|
description: |-
|
47
26
|
sexp_processor branches from ParseTree bringing all the generic sexp
|
@@ -95,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
95
74
|
requirements: []
|
96
75
|
|
97
76
|
rubyforge_project: parsetree
|
98
|
-
rubygems_version: 1.3.
|
77
|
+
rubygems_version: 1.3.5
|
99
78
|
signing_key:
|
100
79
|
specification_version: 3
|
101
80
|
summary: sexp_processor branches from ParseTree bringing all the generic sexp processing tools with it
|
data.tar.gz.sig
DELETED
Binary file
|
metadata.gz.sig
DELETED
Binary file
|