solargraph 0.26.0 → 0.26.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
  SHA256:
3
- metadata.gz: 6faf5ac32f43c83b6d510ed61cac764185616fc4420198ed7adf6b9285ce7d77
4
- data.tar.gz: 4d7a0abf2e8dd321dbefc90932766c97167caad8291739ed4ca4dc1537ea381e
3
+ metadata.gz: 54749425491eea537bc8a0ef4878e21fd17aee1c88e3575a44fecbdbfe323498
4
+ data.tar.gz: 2c61f75cb843a534dc8779245a5395f3d38f411efd3cb0350cfc473b53d7e290
5
5
  SHA512:
6
- metadata.gz: '08ea817581e66ecc51b4cb19ccb2f5fa7dbb414375b3c1461ce680fa5c382ff2faa46da58e4a297c8a81ffd5782cb6aef9a8eecd74b8804f0e2c6addd56205d6'
7
- data.tar.gz: 73f36e26202c49869b8afcf4cfd77971f3614863e74dd8f5f6c386fe5fa5d844e62e2995ffa198b4468645577d936b97c4bbf9fdab65b0a8956c95036acfee2b
6
+ metadata.gz: 76bb57c0cc0843d3a71c8ee3afa65d4f14282455d43f3fcd0fa471387ff547873476cb39c5164f8ea0499d1586d7e34f1dbb14c701c7aab02abfc9de06fad676
7
+ data.tar.gz: 37cc582ea792270dbe447e356b575ef2d81e76b4af9805428048589b59ef0a6f20a3c70b169631a83a1fdfb328b0ce39550b14d497fb5aad6b8f89b67a2c5a96
@@ -3,8 +3,6 @@ module Solargraph
3
3
  class BaseVariable < Base
4
4
  include Solargraph::Source::NodeMethods
5
5
 
6
- attr_reader :signature
7
-
8
6
  attr_reader :context
9
7
 
10
8
  def initialize location, namespace, name, comments, assignment, literal, context
@@ -57,16 +55,20 @@ module Solargraph
57
55
 
58
56
  def == other
59
57
  return false unless super
60
- signature == other.signature
58
+ assignment == other.assignment
61
59
  end
62
60
 
63
61
  def try_merge! pin
64
62
  return false unless super
65
- @signature = pin.signature
63
+ @assignment = pin.assignment
66
64
  @return_complex_type = pin.return_complex_type
67
65
  true
68
66
  end
69
67
 
68
+ protected
69
+
70
+ attr_reader :assignment
71
+
70
72
  private
71
73
 
72
74
  def generate_complex_type
@@ -3,8 +3,8 @@ module Solargraph
3
3
  class Constant < BaseVariable
4
4
  attr_reader :visibility
5
5
 
6
- def initialize location, namespace, name, comments, signature, literal, context, visibility
7
- super(location, namespace, name, comments, signature, literal, context)
6
+ def initialize location, namespace, name, comments, assignment, literal, context, visibility
7
+ super(location, namespace, name, comments, assignment, literal, context)
8
8
  @visibility = visibility
9
9
  end
10
10
 
@@ -6,10 +6,12 @@ module Solargraph
6
6
  @word = word
7
7
  end
8
8
 
9
+ # @param api_map [ApiMap]
9
10
  def resolve_pins api_map, context, locals
10
- ns = api_map.qualify(word, context.named_context)
11
- return [] if ns.nil?
12
- api_map.get_path_suggestions(ns)
11
+ parts = word.split('::')
12
+ last = parts.pop
13
+ first = parts.join('::').to_s
14
+ api_map.get_constants(first, context.named_context).select{|p| p.name == last}
13
15
  end
14
16
  end
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module Solargraph
2
- VERSION = '0.26.0'
2
+ VERSION = '0.26.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solargraph
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fred Snyder
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-30 00:00:00.000000000 Z
11
+ date: 2018-08-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: parser