code_breaker 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b10f45d7870b6729fc5b5632f03351e45014589
|
4
|
+
data.tar.gz: 40d6687ab9d31cda37ef4cf9d0bb881899e7f047
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 052ec71488e79e1e53bf761976fc16ba2c409469a6c0f8de0be8d41b14db445804564b90ec1007a694e7c1eb287772e1493993434593d30a9152faeef41d804f
|
7
|
+
data.tar.gz: e02cf3f28507ca5ae3e52ae2a031b73665921aa99e684bc7a1b150820a73a8043fef8ee5fed76b9b9cb3b0835a866838d979391f9c42e99e1e00432da0c40740
|
@@ -45,14 +45,11 @@ module CodeBreaker
|
|
45
45
|
node.children[0].class
|
46
46
|
end
|
47
47
|
|
48
|
-
def parse_hash_node(node)
|
49
|
-
{ node.type => parse_children(node).inject(:merge).to_h }
|
50
|
-
end
|
51
|
-
|
52
48
|
def parse_pair_node(node)
|
53
49
|
{ parse(node.children[0]) => parse(node.children[1]) }
|
54
50
|
end
|
55
51
|
|
52
|
+
alias :parse_hash_node :parse_as_hash
|
56
53
|
alias :parse_array_node :parse_as_hash
|
57
54
|
end
|
58
55
|
end
|
@@ -11,16 +11,14 @@ module CodeBreaker
|
|
11
11
|
alias :parse_or_node :parse_as_hash
|
12
12
|
alias :parse_and_node :parse_as_hash
|
13
13
|
alias :parse_def_node :parse_as_hash
|
14
|
-
alias :parse_module_node :parse_as_hash
|
15
14
|
alias :parse_yield_node :parse_as_hash
|
16
|
-
|
17
|
-
alias :parse_break_node :parse_as_node_type
|
18
|
-
alias :parse_next_node :parse_as_node_type
|
19
|
-
alias :parse_retry_node :parse_as_node_type
|
20
|
-
alias :parse_self_node :parse_as_node_type
|
21
15
|
alias :parse_rescue_node :parse_as_hash
|
22
|
-
alias :parse_resbody_node
|
23
|
-
|
16
|
+
alias :parse_resbody_node :parse_as_hash
|
17
|
+
|
18
|
+
alias :parse_break_node :parse_as_node_type
|
19
|
+
alias :parse_next_node :parse_as_node_type
|
20
|
+
alias :parse_retry_node :parse_as_node_type
|
21
|
+
alias :parse_self_node :parse_as_node_type
|
24
22
|
|
25
23
|
def parse_loop_node(node)
|
26
24
|
condition = node.children[0]
|
data/lib/code_breaker/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: code_breaker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Paul Götze
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parser
|