dissociated_introspection 0.11.0 → 0.12.0

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
  SHA256:
3
- metadata.gz: 882e7dbe56d7d2cf361e7d572a72c955c74d58e0918140255ce15606a6f3cb3d
4
- data.tar.gz: df0f04acc33076c45a5c2eb0a7c1d1d2ac40f901b931fbacfbd75210c5241068
3
+ metadata.gz: 8040b8f7ef63c5de08e4b88d65fe5ca999234c322cfb5af86d39878c1f6e08e3
4
+ data.tar.gz: 57248fae037569c0aebb652e6392f898a9b02c6f7c3c877aaf87a1b15de56bd7
5
5
  SHA512:
6
- metadata.gz: 91404ea1dddef2e77f98c9c81d0e73c4280a9313426c7ecd745a18e72aca525f78ac68d41c5f9ab393bd9284ac4133a293d70898e1416dbaabd6f22467d216b6
7
- data.tar.gz: ced0ed7383e7a6ebf0b4c51a4ce5afffbeabaf5523131bdf5245578be4c7d48268653293be12712a26852928f5b3f85f318820749364308970d5069ebb9b036f
6
+ metadata.gz: 88c2abac9098f88bbb57f0ea57141e53a2923787d4d24094ff43d2d021c2f7a03c8e709f9b3f0c2219d81bc38d2b015271f8e47c1d15ce861e2c2eb75da3de08
7
+ data.tar.gz: 547e6a36dbc1734a9f5ba16b68703eedf2e87b66364e04c3b39fc771c05fa2ce67301809d6ed09b91d1630b6b68fc480500429d94c4a92fbf23a6ed12527fb39
@@ -1,6 +1,10 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
+ ## 0.12.0 - 2018-08-02
5
+ ### Enhancement
6
+ - MethodInLiner will now recursively in-lines methods.
7
+
4
8
  ## 0.11.0 - 2018-08-01
5
9
  ### Enhancement
6
10
  - Ability to Inline local methods with the exception of ones with arguments passed.
@@ -20,12 +20,21 @@ module DissociatedIntrospection
20
20
  attr_accessor :defs
21
21
 
22
22
  def on_send(node)
23
+ if (result = in_line_calls(node))
24
+ result
25
+ else
26
+ super
27
+ end
28
+ end
29
+
30
+ def in_line_calls(node)
23
31
  called_on, method_name, *args = *node
24
32
  # TODO: Deal with args by replacing lvar with passed objects
25
- return super unless args.empty? && called_on_self?(called_on)
33
+ return unless args.empty? && called_on_self?(called_on)
26
34
  called_method = called_method(method_name)
27
- return super unless called_method
28
- node.updated(called_method.body.ast.type, called_method.body.ast.children)
35
+ return unless called_method
36
+ processed_called_method = process(called_method.body.ast)
37
+ node.updated(processed_called_method.type, processed_called_method.children)
29
38
  end
30
39
 
31
40
  def called_on_self?(called_on)
@@ -1,3 +1,3 @@
1
1
  module DissociatedIntrospection
2
- VERSION = "0.11.0"
2
+ VERSION = "0.12.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dissociated_introspection
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.11.0
4
+ version: 0.12.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler