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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5f6aed363a91e514906a1c005fe2af6ec3583fa8742f997055def47e1f085c0c
4
- data.tar.gz: 574b02c68a6a84f98384d9ba60c8b2d88b95c2cb3db49aa2eccb61e3e1dfc9ab
3
+ metadata.gz: 0c4c9274f8938bdb75aee48a480ea324b9167ea1bb6d27aff8f831908e4083bb
4
+ data.tar.gz: 9daeadaf79271deb8ea3469195081a6e7e3a318572bd4e1aa7997b2436223589
5
5
  SHA512:
6
- metadata.gz: 0a73835caa30f00145df491efd1bbcedbb2a7ada0cd0b2328cc8c0d9004bd51607328883630529165e9863a9852df40e17414854133a1d1d0144f690e49a50ef
7
- data.tar.gz: ecb9bc59302300646d8dad3ea1345aecf236aec833e35cf1c83cedbfe5de5369c87965f3877d93e952cbf3536ff603fea2564032a07dba3db77c9872a4d46318
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}) -> instance"
65
- lines << " | (#{positional_params}) -> instance"
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) -> instance"
83
- lines << " | (?Hash[String, untyped] data) -> instance"
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) -> instance"
86
+ lines << " def self.parse: (?(Hash[String | Symbol, untyped]), **untyped) -> #{class_name}"
87
87
  end
88
88
  lines << ""
89
89
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Structure
4
- VERSION = "3.6.0"
4
+ VERSION = "3.6.1"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: structure
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.6.0
4
+ version: 3.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hakan Ensari