motion_blender 0.2.2 → 0.2.3
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 06e621bbd2f321beaa3ef896a08a37e77a0538ba
|
4
|
+
data.tar.gz: 0afa99ca6962069e5b31329e3fc816d0d0af7cc2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 34d059530acb1feec3ebf0426f8aeb39e4e998ca8573bb5567b5a9579ad6b097c9ed73578167fcf41365745cbb919fb2bfba20585ec3ebebe9d51eaadc21dd8f
|
7
|
+
data.tar.gz: ce382725bbfc7ba808cfe2fe07cea90d609be9398ed6698fcbc27c8747711b66a6244a296c24895b9ad6aa3b84b87bc365c74704f0a85e39dd515c2688a1da00
|
@@ -34,9 +34,7 @@ module MotionBlender
|
|
34
34
|
def parse file, backtrace
|
35
35
|
parser = Parser.new file
|
36
36
|
begin
|
37
|
-
parser.
|
38
|
-
parser.parse
|
39
|
-
end
|
37
|
+
parser.parse
|
40
38
|
rescue LoadError => err
|
41
39
|
err.set_backtrace [parser.last_trace, *backtrace].compact
|
42
40
|
raise err
|
@@ -21,9 +21,9 @@ module MotionBlender
|
|
21
21
|
|
22
22
|
def parse
|
23
23
|
srcs = cache.fetch do
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
run_callbacks :parse do
|
25
|
+
ast = ::Parser::CurrentRuby.parse_file(@file)
|
26
|
+
ast && traverse(Source.new(ast: ast))
|
27
27
|
@evaluators.map(&:source).map(&:attributes)
|
28
28
|
end
|
29
29
|
end
|
@@ -19,6 +19,8 @@ module MotionBlender
|
|
19
19
|
attrs.each do |k, v|
|
20
20
|
instance_variable_set "@#{k}", v
|
21
21
|
end
|
22
|
+
@type = @type.to_s.inquiry
|
23
|
+
@method = @method.try(:to_sym)
|
22
24
|
end
|
23
25
|
|
24
26
|
def evaluated!
|
@@ -37,9 +39,13 @@ module MotionBlender
|
|
37
39
|
end
|
38
40
|
|
39
41
|
def attributes
|
40
|
-
|
41
|
-
|
42
|
-
|
42
|
+
{
|
43
|
+
'code' => @code,
|
44
|
+
'file' => @file,
|
45
|
+
'line' => @line,
|
46
|
+
'type' => @type.to_s,
|
47
|
+
'method' => @method.try(:to_s)
|
48
|
+
}
|
43
49
|
end
|
44
50
|
end
|
45
51
|
end
|