solargraph 0.51.0 → 0.51.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/solargraph/pin/block.rb +6 -1
- data/lib/solargraph/pin/method.rb +13 -5
- data/lib/solargraph/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 353848ebb4c6cbcd1d29568a94ca2350bcfc3278292439f20ca193ac3feebbe4
|
4
|
+
data.tar.gz: d679687c21c2749452b8f32580c5bd0d3753c2b5422a1d0e2a5789044b3892c9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9ea698ddf8c609f6f912a02cd0b6b9952719c7d4f5398a68c1662004db285f1b6a0ee2ad2bedb60fecff61cd559ed9f685bb19a3594f59de591c4f8f659c2622
|
7
|
+
data.tar.gz: '020828068d62bded6d4ed1f205fdcc7cc961d108df8c6e2060d429c69a02e53652b1dd8587d6c697ae81109d50b7f8de2abf84240606a76c30bce24cbf0d43ab'
|
data/CHANGELOG.md
CHANGED
data/lib/solargraph/pin/block.rb
CHANGED
@@ -63,7 +63,12 @@ module Solargraph
|
|
63
63
|
if receiver_pin && receiver_pin.docstring
|
64
64
|
ys = receiver_pin.docstring.tag(:yieldself)
|
65
65
|
if ys && ys.types && !ys.types.empty?
|
66
|
-
|
66
|
+
target = if chain.links.first.is_a?(Source::Chain::Constant)
|
67
|
+
receiver_pin.full_context.namespace
|
68
|
+
else
|
69
|
+
full_context.namespace
|
70
|
+
end
|
71
|
+
return ComplexType.try_parse(*ys.types).qualify(api_map, receiver_pin.context.namespace).self_to(target)
|
67
72
|
end
|
68
73
|
end
|
69
74
|
nil
|
@@ -130,11 +130,7 @@ module Solargraph
|
|
130
130
|
end
|
131
131
|
@documentation += "\n\n" unless @documentation.empty?
|
132
132
|
@documentation += "Visibility: #{visibility}"
|
133
|
-
|
134
|
-
unless example_tags.empty?
|
135
|
-
@documentation += "\n\nExamples:\n\n"
|
136
|
-
@documentation += example_tags.map(&:text).join("\n")
|
137
|
-
end
|
133
|
+
concat_example_tags
|
138
134
|
end
|
139
135
|
@documentation.to_s
|
140
136
|
end
|
@@ -335,6 +331,18 @@ module Solargraph
|
|
335
331
|
[name, :arg]
|
336
332
|
end
|
337
333
|
end
|
334
|
+
|
335
|
+
def concat_example_tags
|
336
|
+
example_tags = docstring.tags(:example)
|
337
|
+
return if example_tags.empty?
|
338
|
+
@documentation += "\n\nExamples:\n\n```ruby\n"
|
339
|
+
@documentation += example_tags.map do |tag|
|
340
|
+
(tag.name ? "# #{tag.name}\n" : '') +
|
341
|
+
"#{tag.text}\n"
|
342
|
+
end
|
343
|
+
.join("\n")
|
344
|
+
.concat("```\n")
|
345
|
+
end
|
338
346
|
end
|
339
347
|
end
|
340
348
|
end
|
data/lib/solargraph/version.rb
CHANGED
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.51.
|
4
|
+
version: 0.51.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: 2025-01-
|
11
|
+
date: 2025-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|