sexp_processor 4.5.0 → 4.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/sexp_processor.rb +25 -9
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 62c0aa828d8f1248831b41b55c5e98d555f78d72
|
4
|
+
data.tar.gz: 8400a9eea896d3abe596824d0d4bbd032b1aeb84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43948ed14ddf302790cc948f6c6587cfe8dd51a80eede842c1d3fae7305a3263fde9ee88c9bbebf3f701eed20c6c83c5ff06d7f5105156f943afa522bfe9dbee
|
7
|
+
data.tar.gz: bc347b20545780e71531eb702d215a83eff13b7aeb8149e6dc62e2716db4ea8b7f16886ca6c73dcef1b773201b1e159d7f9ca0f957b9504408f7dad6ffae9e86
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/sexp_processor.rb
CHANGED
@@ -33,7 +33,7 @@ require 'sexp'
|
|
33
33
|
|
34
34
|
class SexpProcessor
|
35
35
|
|
36
|
-
VERSION = "4.5.
|
36
|
+
VERSION = "4.5.1"
|
37
37
|
|
38
38
|
##
|
39
39
|
# Automatically shifts off the Sexp type before handing the
|
@@ -109,6 +109,20 @@ class SexpProcessor
|
|
109
109
|
}.flatten.sort
|
110
110
|
end
|
111
111
|
|
112
|
+
##
|
113
|
+
# Cache processor methods per class.
|
114
|
+
|
115
|
+
def self.processors
|
116
|
+
@processors ||= {}
|
117
|
+
end
|
118
|
+
|
119
|
+
##
|
120
|
+
# Cache rewiter methods per class.
|
121
|
+
|
122
|
+
def self.rewriters
|
123
|
+
@rewriters ||= {}
|
124
|
+
end
|
125
|
+
|
112
126
|
##
|
113
127
|
# Creates a new SexpProcessor. Use super to invoke this
|
114
128
|
# initializer from SexpProcessor subclasses, then use the
|
@@ -130,16 +144,18 @@ class SexpProcessor
|
|
130
144
|
|
131
145
|
# we do this on an instance basis so we can subclass it for
|
132
146
|
# different processors.
|
133
|
-
@processors =
|
134
|
-
@rewriters =
|
147
|
+
@processors = self.class.processors
|
148
|
+
@rewriters = self.class.rewriters
|
135
149
|
@context = []
|
136
150
|
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
151
|
+
if @processors.empty?
|
152
|
+
public_methods.each do |name|
|
153
|
+
case name
|
154
|
+
when /^process_(.*)/ then
|
155
|
+
@processors[$1.to_sym] = name.to_sym
|
156
|
+
when /^rewrite_(.*)/ then
|
157
|
+
@rewriters[$1.to_sym] = name.to_sym
|
158
|
+
end
|
143
159
|
end
|
144
160
|
end
|
145
161
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sexp_processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.5.
|
4
|
+
version: 4.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2015-
|
32
|
+
date: 2015-04-27 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: minitest
|
@@ -37,14 +37,14 @@ dependencies:
|
|
37
37
|
requirements:
|
38
38
|
- - ~>
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '5.
|
40
|
+
version: '5.6'
|
41
41
|
type: :development
|
42
42
|
prerelease: false
|
43
43
|
version_requirements: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ~>
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.6'
|
48
48
|
- !ruby/object:Gem::Dependency
|
49
49
|
name: rdoc
|
50
50
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|