drg 0.14.1 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/drg/ruby/const.rb +11 -3
- data/lib/drg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8d468fed79634c64ab7a1c56229ddd1df6468e1f
|
4
|
+
data.tar.gz: c9f6cdd369cd401d801a0746fb296d2bfc950f1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 79a33b930a524ab07ff9f1b8661d7b01619b09b3c27fc0cb4d56e221407da0573d53524847d278458560c0299a20637a1886ad170a173d17ac3a394777ff21b6
|
7
|
+
data.tar.gz: 12c488067864048c692f293b4da7384928a9a01396e4443c8cffdde013c0d087b3b288ece80c036cd18558e009d6fce7d2c77671f25c8b1f9434ca4e03e0886c
|
data/lib/drg/ruby/const.rb
CHANGED
@@ -41,7 +41,7 @@ class DRG::Ruby::Const
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def funcs
|
44
|
-
@funcs ||=
|
44
|
+
@funcs ||= load_funcs.flatten
|
45
45
|
end
|
46
46
|
|
47
47
|
def class?
|
@@ -62,9 +62,9 @@ class DRG::Ruby::Const
|
|
62
62
|
|
63
63
|
private
|
64
64
|
|
65
|
-
def
|
65
|
+
def load_funcs(sexp_list = sexp)
|
66
66
|
marked_private = false
|
67
|
-
|
67
|
+
sexp_list.map { |node|
|
68
68
|
next unless node.is_a?(Sexp)
|
69
69
|
case node.first
|
70
70
|
when :defn
|
@@ -74,7 +74,15 @@ class DRG::Ruby::Const
|
|
74
74
|
when :call
|
75
75
|
marked_private ||= node[2] == :private
|
76
76
|
nil
|
77
|
+
when ->(name) { CONSTANT_DEFS.key?(name) }
|
78
|
+
# @note handle stuff like:
|
79
|
+
# s(:class, :VerificationCode, nil, s(:defs, s(:self), :find, s(:args, :*)))
|
80
|
+
# and
|
81
|
+
# s(:module, :ConditionParsers, s(:class, :ReturnValue, ...))
|
82
|
+
load_funcs(node.compact[2])
|
77
83
|
else
|
84
|
+
# @todo uncomment with logger at debug level
|
85
|
+
# puts "got #{__method__} with #{node.first} and don't know how to handle it"
|
78
86
|
nil
|
79
87
|
end
|
80
88
|
}.compact
|
data/lib/drg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: drg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Buckley
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby_parser
|