active_record_compose 0.3.2 → 0.3.3

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: 9d71146cd07fcae3e2ba02f5a3130d3eab0cba06dc405584793fa30d4add22ad
4
- data.tar.gz: 88e70c5d2c6f8327c03c658304d6b036636f9b9ef4f342a45dd2afc7cc1cda4f
3
+ metadata.gz: f9038b3106a9206304243a5723488fe400e6c05eba4edb69fef0e2a7a154f15f
4
+ data.tar.gz: 7432c93447a3627cf6c1e6706d6d0d3d1ea1e6d80079b9038e73fe1fd1bddaeb
5
5
  SHA512:
6
- metadata.gz: 76b5dd94c5246ca424564721a9f185488c1d51dcb12177a08c1d103110e05fd510b87f1cb2811256ab1d0d30425f327e8e1179e4c7e62ea3377fd155a708be9e
7
- data.tar.gz: 7e03b2ea7f423047f5eda1ea89b80b586d7ab3c4ad7d616562a6aa9a555e846336f67f30e5e4b45a28e68913091ea5f3e00aee360f22c0689263380b734d0f3f
6
+ metadata.gz: 7ce874d30acf694f7be00c7177a7dcc82a49f8119709fa07b0d9cac98fc4f44ca03211bb104c8d9e2173d42ceebb0de00567c8666e1b1b6adaadd587e60d35ba
7
+ data.tar.gz: 0f3100317539f2e383ac07fed57f027c90f4030ccd2717fae2e54f288a3f17f92488fa23dc86d6cc80a05746542ef68b780c56b63dd9609ab2f27b39c21a8045
@@ -38,7 +38,7 @@ module ActiveRecordCompose
38
38
  extend ActiveSupport::Concern
39
39
 
40
40
  included do
41
- __skip__ = class_attribute :delegated_attributes, instance_writer: false
41
+ class_attribute :delegated_attributes, instance_writer: false # steep:ignore
42
42
  end
43
43
 
44
44
  module ClassMethods
@@ -52,12 +52,9 @@ module ActiveRecordCompose
52
52
  [reader, writer]
53
53
  end
54
54
 
55
- __skip__ =
56
- begin
57
- delegate(*delegates, to:, **options)
58
- delegated_attributes = (self.delegated_attributes ||= [])
59
- attributes.each { delegated_attributes.push(_1.to_s) }
60
- end
55
+ delegate(*delegates, to:, **options) # steep:ignore
56
+ delegated_attributes = (self.delegated_attributes ||= []) # steep:ignore
57
+ attributes.each { delegated_attributes.push(_1.to_s) }
61
58
  end
62
59
  end
63
60
 
@@ -66,8 +63,8 @@ module ActiveRecordCompose
66
63
  #
67
64
  # @return [Hash] hash with the attribute name as key and the attribute value as value.
68
65
  def attributes
69
- attrs = __skip__ = defined?(super) ? super : {}
70
- delegates = __skip__ = delegated_attributes
66
+ attrs = defined?(super) ? super : {} # steep:ignore
67
+ delegates = delegated_attributes # steep:ignore
71
68
 
72
69
  # @type var attrs: Hash[String, untyped]
73
70
  # @type var delegates: Array[String]
@@ -76,7 +76,7 @@ module ActiveRecordCompose
76
76
  # @return [Boolean]
77
77
  def ==(other)
78
78
  return false unless self.class == other.class
79
- return false unless (__skip__ = (__raw_model == other.__raw_model))
79
+ return false unless __raw_model == other.__raw_model # steep:ignore
80
80
  return false unless context == other.context
81
81
 
82
82
  true
@@ -14,7 +14,7 @@ module ActiveRecordCompose
14
14
  def each
15
15
  return enum_for(:each) unless block_given?
16
16
 
17
- __skip__ = models.each { yield _1.__raw_model }
17
+ models.each { yield _1.__raw_model } # steep:ignore
18
18
  self
19
19
  end
20
20
 
@@ -73,7 +73,7 @@ module ActiveRecordCompose
73
73
  def __each_by_wrapped
74
74
  return enum_for(:__each_by_wrapped) unless block_given?
75
75
 
76
- __skip__ = models.each { yield _1 if _1.__raw_model }
76
+ models.each { yield _1 if _1.__raw_model } # steep:ignore
77
77
  self
78
78
  end
79
79
 
@@ -82,7 +82,7 @@ module ActiveRecordCompose
82
82
  def models = @models ||= []
83
83
 
84
84
  def wrap(model, context:)
85
- if (__skip__ = model.is_a?(ActiveRecordCompose::InnerModel))
85
+ if model.is_a?(ActiveRecordCompose::InnerModel) # steep:ignore
86
86
  # @type var model: ActiveRecordCompose::InnerModel
87
87
  model
88
88
  else
@@ -20,7 +20,7 @@ module ActiveRecordCompose
20
20
  validate :validate_models
21
21
 
22
22
  def initialize(attributes = {})
23
- __skip__ = super(attributes)
23
+ super
24
24
  end
25
25
 
26
26
  # Save the models that exist in models.
@@ -150,7 +150,7 @@ module ActiveRecordCompose
150
150
 
151
151
  def models = @__models ||= ActiveRecordCompose::InnerModelCollection.new
152
152
 
153
- def wrapped_models = (__skip__ = models.__each_by_wrapped)
153
+ def wrapped_models = models.__each_by_wrapped # steep:ignore
154
154
 
155
155
  def validate_models = wrapped_models.select { _1.invalid? }.each { errors.merge!(_1) }
156
156
 
@@ -8,7 +8,7 @@ module ActiveRecordCompose
8
8
  module ClassMethods
9
9
  def lease_connection
10
10
  if ar_class.respond_to?(:lease_connection)
11
- __skip__ = ar_class.lease_connection
11
+ ar_class.lease_connection # steep:ignore
12
12
  else
13
13
  ar_class.connection
14
14
  end
@@ -16,7 +16,7 @@ module ActiveRecordCompose
16
16
 
17
17
  def connection = ar_class.connection
18
18
 
19
- def with_connection(&) = __skip__ = ar_class.with_connection(&)
19
+ def with_connection(&) = ar_class.with_connection(&) # steep:ignore
20
20
 
21
21
  def composite_primary_key? = false
22
22
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ActiveRecordCompose
4
- VERSION = '0.3.2'
4
+ VERSION = '0.3.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record_compose
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.3.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - hamajyotan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-04-10 00:00:00.000000000 Z
11
+ date: 2024-06-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -52,7 +52,7 @@ metadata:
52
52
  homepage_uri: https://github.com/hamajyotan/active_record_compose
53
53
  source_code_uri: https://github.com/hamajyotan/active_record_compose
54
54
  changelog_uri: https://github.com/hamajyotan/active_record_compose/blob/main/CHANGELOG.md
55
- documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.3.2
55
+ documentation_uri: https://www.rubydoc.info/gems/active_record_compose/0.3.3
56
56
  rubygems_mfa_required: 'true'
57
57
  post_install_message:
58
58
  rdoc_options: []
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  requirements: []
72
- rubygems_version: 3.5.6
72
+ rubygems_version: 3.5.11
73
73
  signing_key:
74
74
  specification_version: 4
75
75
  summary: activemodel form object pattern