yard-sorbet 0.6.0 → 0.6.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: 809250a1720fa07f83c0a4545ef5addf33f5a2d4be0dc21e2ca69bd63730bd66
4
- data.tar.gz: 7f8381d22e69b630627cc3a833ddde59938522800ea7d2966bd98ae39fe33a35
3
+ metadata.gz: 2f2eb93a66e3c6308a6e1cb10e26eae958d8b114451ee4405659f13da9d423cf
4
+ data.tar.gz: 869f388d3b14dfaec0d63bb910ab039ec556f010fc586fe8d5e6234a2e1e2bac
5
5
  SHA512:
6
- metadata.gz: bf72fdb12fb92b88414edd595484734175d2d8f2a6be4030414e8871d858de62c077c862f64aa738911b9ea2d90a2ae616e986c128e35ceb5a0de6ed052a0576
7
- data.tar.gz: 5f04cb364f05793cd5112ebfcd2681291aedad3e851c1f9ba8e5302750fd16446d61e3e9862a1634f8d472a7ad3fb2325fcffde8789e6df9a34d4484c055fba2
6
+ metadata.gz: 4ec95f037474cb2e2c95aed81e369901e945014e241ecfb5d12fd4ce1cec1871dda4599ad0915d283ca2a8355b2125e22a71eefdf23fe27d98e06573590fe79b
7
+ data.tar.gz: d34b5eaabc45de6b5bb58fbc4592468cb0074872e11a6af0c062bea082a98c81687e283b66c98f786025ae5eddd1b64708932f50c6c9798d853fe2d1161b5e12
@@ -14,11 +14,9 @@ module YARDSorbet
14
14
 
15
15
  sig { void }
16
16
  def process
17
- return unless extra_state.mix_in_class_methods
18
-
19
17
  statement.parameters(false).each do |mixin|
20
18
  obj = YARD::CodeObjects::Proxy.new(namespace, mixin.source)
21
- class_methods_namespace = extra_state.mix_in_class_methods[obj.to_s]
19
+ class_methods_namespace = MixesInClassMethodsHandler.mixed_in_class_methods(obj.to_s)
22
20
  next unless class_methods_namespace
23
21
 
24
22
  included_in.mixins(:class) << YARD::CodeObjects::Proxy.new(obj, class_methods_namespace)
@@ -12,10 +12,16 @@ module YARDSorbet
12
12
  handles method_call(:mixes_in_class_methods)
13
13
  namespace_only
14
14
 
15
+ @@mix_in_class_methods = T.let({}, T::Hash[String, String]) # rubocop:disable Style/ClassVars
16
+
17
+ sig { params(code_obj: String).returns(T.nilable(String)) }
18
+ def self.mixed_in_class_methods(code_obj)
19
+ @@mix_in_class_methods[code_obj]
20
+ end
21
+
15
22
  sig { void }
16
23
  def process
17
- extra_state.mix_in_class_methods ||= {}
18
- extra_state.mix_in_class_methods[namespace.to_s] = statement.parameters(false)[0].source
24
+ @@mix_in_class_methods[namespace.to_s] = statement.parameters(false)[0].source
19
25
  end
20
26
  end
21
27
  end
@@ -4,5 +4,5 @@
4
4
  # Types are documentation
5
5
  module YARDSorbet
6
6
  # {https://rubygems.org/gems/yard-sorbet Version history}
7
- VERSION = '0.6.0'
7
+ VERSION = '0.6.1'
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yard-sorbet
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Eichelberger
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-13 00:00:00.000000000 Z
11
+ date: 2021-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler-audit
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.11.0
103
+ version: 1.12.0
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.11.0
110
+ version: 1.12.0
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: rubocop-rake
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0'
258
258
  requirements: []
259
- rubygems_version: 3.1.6
259
+ rubygems_version: 3.2.22
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: Create YARD docs from Sorbet type signatures