sexp_processor 4.1.5 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- �hA��M�S�����e��geM!N�7�����j@�qm��6}��W��rR�^�k`��h�=�oIS�|[;B���f�”Ȍ�bB��gz�}�i~�c�Ce0�p�)X��)��b�h���¤�=y1$��*����q9*"�6߲!.g^���PuOfym+��Mn5OMle+;�X����}a�%X�c5�t��#p��+�o��o3��q��5�3 3�0����m�#[�,��\����#��Ƿ��W,�H�#
1
+ :g� �炣���vG��קM�^�C��`�RGJZxaHg �\�Y��"Ĕ�q�w��]}zPH��dD3Xoz�`=��)Wy�һ 9v#�Tl���&Fә2Ȥ5ܟ���8�\QJeH�>�@P���G(�*��b�jjvhA]c���$U
2
+ ��Ļ-�FEN�x��:���
@@ -1,3 +1,10 @@
1
+ === 4.2.0 / 2013-03-18
2
+
3
+ * 2 minor enhancements:
4
+
5
+ * Added SexpInterpreter since it is such a common pattern
6
+ * Added aliases Sexp#head & Sexp#rest for readability
7
+
1
8
  === 4.1.5 / 2013-02-14
2
9
 
3
10
  * 2 bug fixes:
@@ -237,6 +237,9 @@ class Sexp < Array # ZenTest FULL
237
237
  self[1..-1]
238
238
  end
239
239
 
240
+ alias :head :sexp_type
241
+ alias :rest :sexp_body
242
+
240
243
  ##
241
244
  # If run with debug, Sexp will raise if you shift on an empty
242
245
  # Sexp. Helps with debugging.
@@ -33,7 +33,7 @@ require 'sexp'
33
33
 
34
34
  class SexpProcessor
35
35
 
36
- VERSION = '4.1.5'
36
+ VERSION = '4.2.0'
37
37
 
38
38
  ##
39
39
  # Automatically shifts off the Sexp type before handing the
@@ -389,6 +389,21 @@ class SexpProcessor
389
389
  end
390
390
  end
391
391
 
392
+ ##
393
+ # A simple subclass of SexpProcessor that defines a pattern I commonly
394
+ # use: non-mutative and strict process that return assorted values;
395
+ # AKA, an interpreter.
396
+
397
+ class SexpInterpreter < SexpProcessor
398
+ def initialize
399
+ super
400
+
401
+ self.expected = Object
402
+ self.require_empty = false
403
+ self.strict = true
404
+ end
405
+ end
406
+
392
407
  class Object
393
408
 
394
409
  ##
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: 49
4
+ hash: 55
5
5
  prerelease:
6
6
  segments:
7
7
  - 4
8
- - 1
9
- - 5
10
- version: 4.1.5
8
+ - 2
9
+ - 0
10
+ version: 4.2.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: 2013-02-15 00:00:00 Z
39
+ date: 2013-03-18 00:00:00 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
metadata.gz.sig CHANGED
Binary file