sexp_processor 3.2.0 → 4.0.0
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.tar.gz.sig +0 -0
- data/History.txt +14 -0
- data/README.txt +1 -2
- data/lib/pt_testcase.rb +561 -808
- data/lib/sexp.rb +23 -1
- data/lib/sexp_processor.rb +1 -1
- metadata +9 -9
- metadata.gz.sig +0 -0
data/lib/sexp.rb
CHANGED
@@ -88,6 +88,17 @@ class Sexp < Array # ZenTest FULL
|
|
88
88
|
self.delete_if { |o| o.nil? }
|
89
89
|
end
|
90
90
|
|
91
|
+
##
|
92
|
+
# Recursively enumerates the sexp yielding to +block+ for every element.
|
93
|
+
# TODO: test
|
94
|
+
|
95
|
+
def deep_each(&block)
|
96
|
+
self.each_sexp do |sexp|
|
97
|
+
block[sexp]
|
98
|
+
sexp.deep_each(&block)
|
99
|
+
end
|
100
|
+
end
|
101
|
+
|
91
102
|
##
|
92
103
|
# Enumeratates the sexp yielding to +b+ when the node_type == +t+.
|
93
104
|
|
@@ -100,6 +111,18 @@ class Sexp < Array # ZenTest FULL
|
|
100
111
|
end
|
101
112
|
end
|
102
113
|
|
114
|
+
##
|
115
|
+
# Recursively enumerates all sub-sexps skipping non-Sexp elements.
|
116
|
+
# TODO: test
|
117
|
+
|
118
|
+
def each_sexp
|
119
|
+
self.each do |sexp|
|
120
|
+
next unless Sexp === sexp
|
121
|
+
|
122
|
+
yield sexp
|
123
|
+
end
|
124
|
+
end
|
125
|
+
|
103
126
|
##
|
104
127
|
# Replaces all elements whose node_type is +from+ with +to+. Used
|
105
128
|
# only for the most trivial of rewrites.
|
@@ -279,7 +302,6 @@ class Sexp < Array # ZenTest FULL
|
|
279
302
|
def to_s # :nodoc:
|
280
303
|
inspect
|
281
304
|
end
|
282
|
-
|
283
305
|
end
|
284
306
|
|
285
307
|
class SexpMatchSpecial < Sexp; end
|
data/lib/sexp_processor.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sexp_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
|
-
-
|
8
|
-
- 2
|
7
|
+
- 4
|
9
8
|
- 0
|
10
|
-
|
9
|
+
- 0
|
10
|
+
version: 4.0.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Davis
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
FBHgymkyj/AOSqKRIpXPhjC6
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2012-
|
39
|
+
date: 2012-06-07 00:00:00 Z
|
40
40
|
dependencies:
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
@@ -46,11 +46,11 @@ dependencies:
|
|
46
46
|
requirements:
|
47
47
|
- - ~>
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
hash:
|
49
|
+
hash: 7
|
50
50
|
segments:
|
51
|
-
-
|
52
|
-
-
|
53
|
-
version: "
|
51
|
+
- 3
|
52
|
+
- 0
|
53
|
+
version: "3.0"
|
54
54
|
type: :development
|
55
55
|
version_requirements: *id001
|
56
56
|
- !ruby/object:Gem::Dependency
|
metadata.gz.sig
CHANGED
Binary file
|