structure 3.6.0 → 3.6.1
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 +4 -4
- data/lib/structure/rbs.rb +5 -5
- data/lib/structure/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c4c9274f8938bdb75aee48a480ea324b9167ea1bb6d27aff8f831908e4083bb
|
4
|
+
data.tar.gz: 9daeadaf79271deb8ea3469195081a6e7e3a318572bd4e1aa7997b2436223589
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 29ebca3cdff8e8750284b8f1c88b9fd5201ed93b387b2aa8c81872669fce7e52d8496b14d3546fa35b878df87a10e2539aa96789d9a9f0a9589a2c0f5bcf0867
|
7
|
+
data.tar.gz: b176b7dad3f24d4bf54cf80d69dd115ccba5d75396e9d69ee319b09fee77460cf4f69348ade08a45bc6e07f836b8dc06b644c96548bf4e4efcb0ac8b29255fe5
|
data/lib/structure/rbs.rb
CHANGED
@@ -61,8 +61,8 @@ module Structure
|
|
61
61
|
keyword_params = attributes.map { |attr| "#{attr}: #{rbs_types[attr]}" }.join(", ")
|
62
62
|
positional_params = attributes.map { |attr| rbs_types[attr] }.join(", ")
|
63
63
|
|
64
|
-
lines << " def self.new: (#{keyword_params}) ->
|
65
|
-
lines << " | (#{positional_params}) ->
|
64
|
+
lines << " def self.new: (#{keyword_params}) -> #{class_name}"
|
65
|
+
lines << " | (#{positional_params}) -> #{class_name}"
|
66
66
|
lines << ""
|
67
67
|
|
68
68
|
needs_parse_data = types.any? do |_attr, type|
|
@@ -79,11 +79,11 @@ module Structure
|
|
79
79
|
lines[-1] = lines[-1].chomp(",")
|
80
80
|
lines << " }"
|
81
81
|
lines << ""
|
82
|
-
lines << " def self.parse: (?parse_data data) ->
|
83
|
-
lines << " | (?Hash[String, untyped] data) ->
|
82
|
+
lines << " def self.parse: (?parse_data data) -> #{class_name}"
|
83
|
+
lines << " | (?Hash[String, untyped] data) -> #{class_name}"
|
84
84
|
else
|
85
85
|
# For structures without special types, just use Hash
|
86
|
-
lines << " def self.parse: (?(Hash[String | Symbol, untyped]), **untyped) ->
|
86
|
+
lines << " def self.parse: (?(Hash[String | Symbol, untyped]), **untyped) -> #{class_name}"
|
87
87
|
end
|
88
88
|
lines << ""
|
89
89
|
|
data/lib/structure/version.rb
CHANGED