sorbet-rails 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (116) hide show
  1. checksums.yaml +4 -4
  2. data/.gitattributes +1 -2
  3. data/.gitignore +2 -1
  4. data/.travis.yml +1 -1
  5. data/README.md +51 -4
  6. data/Rakefile +3 -3
  7. data/lib/bundled_rbi/customizabel_rbi_formatter.rbi +29 -0
  8. data/lib/bundled_rbi/pluck_to_tstruct.rbi +2 -1
  9. data/lib/sorbet-rails.rb +1 -1
  10. data/lib/sorbet-rails/config.rb +11 -0
  11. data/lib/sorbet-rails/deprecation.rb +1 -0
  12. data/lib/sorbet-rails/gem_plugins/kaminari_plugin.rb +8 -0
  13. data/lib/sorbet-rails/job_rbi_formatter.rb +73 -62
  14. data/lib/sorbet-rails/mailer_rbi_formatter.rb +40 -27
  15. data/lib/sorbet-rails/model_column_utils.rb +129 -0
  16. data/lib/sorbet-rails/model_plugins/active_record_assoc.rb +28 -1
  17. data/lib/sorbet-rails/model_plugins/active_record_attribute.rb +0 -102
  18. data/lib/sorbet-rails/model_plugins/base.rb +0 -10
  19. data/lib/sorbet-rails/model_utils.rb +5 -2
  20. data/lib/sorbet-rails/rails_mixins/pluck_to_tstruct.rb +17 -7
  21. data/lib/sorbet-rails/sorbet_utils.rb +152 -150
  22. data/lib/sorbet-rails/tasks/rails_rbi.rake +3 -3
  23. data/sorbet-rails.gemspec +1 -1
  24. data/spec/job_rbi_formatter_spec.rb +1 -1
  25. data/spec/pluck_to_tstruct_spec.rb +74 -1
  26. data/spec/rails_helper.rb +2 -2
  27. data/spec/rake_rails_rbi_jobs_spec.rb +20 -0
  28. data/spec/rake_rails_rbi_mailers_spec.rb +21 -0
  29. data/spec/support/v5.0/Gemfile +1 -1
  30. data/spec/support/v5.0/Gemfile.lock +8 -8
  31. data/spec/support/v5.1/Gemfile.lock +6 -6
  32. data/spec/support/v5.2/Gemfile +1 -1
  33. data/spec/support/v5.2/Gemfile.lock +8 -8
  34. data/spec/support/v6.0/.gitignore +6 -0
  35. data/spec/support/v6.0/Gemfile +3 -3
  36. data/spec/support/v6.0/Gemfile.lock +76 -75
  37. data/spec/support/v6.0/bin/bundle +22 -13
  38. data/spec/support/v6.0/config/environments/test.rb +1 -1
  39. data/spec/support/v6.0/tmp/pids/.keep +0 -0
  40. data/spec/test_data/v5.0/expected_custom_application_job.rbi +21 -0
  41. data/spec/test_data/v5.0/expected_custom_application_mailer.rbi +6 -0
  42. data/spec/test_data/v5.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  43. data/spec/test_data/v5.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  44. data/spec/test_data/v5.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  45. data/spec/test_data/v5.0/expected_headmaster.rbi +18 -0
  46. data/spec/test_data/v5.0/expected_potion.rbi +9 -0
  47. data/spec/test_data/v5.0/expected_robe.rbi +9 -0
  48. data/spec/test_data/v5.0/expected_school.rbi +9 -0
  49. data/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +18 -0
  50. data/spec/test_data/v5.0/expected_spell_book.rbi +9 -0
  51. data/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +18 -0
  52. data/spec/test_data/v5.0/expected_squib.rbi +18 -0
  53. data/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +18 -0
  54. data/spec/test_data/v5.0/expected_wand.rbi +9 -0
  55. data/spec/test_data/v5.0/expected_wizard.rbi +18 -0
  56. data/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +18 -0
  57. data/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +18 -0
  58. data/spec/test_data/v5.1/expected_custom_application_job.rbi +21 -0
  59. data/spec/test_data/v5.1/expected_custom_application_mailer.rbi +6 -0
  60. data/spec/test_data/v5.1/expected_custom_award_house_point_hourglasses.rbi +21 -0
  61. data/spec/test_data/v5.1/expected_custom_daily_prophet_mailer.rbi +8 -0
  62. data/spec/test_data/v5.1/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  63. data/spec/test_data/v5.1/expected_headmaster.rbi +18 -0
  64. data/spec/test_data/v5.1/expected_potion.rbi +9 -0
  65. data/spec/test_data/v5.1/expected_robe.rbi +9 -0
  66. data/spec/test_data/v5.1/expected_school.rbi +9 -0
  67. data/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +18 -0
  68. data/spec/test_data/v5.1/expected_spell_book.rbi +9 -0
  69. data/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +18 -0
  70. data/spec/test_data/v5.1/expected_squib.rbi +18 -0
  71. data/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +18 -0
  72. data/spec/test_data/v5.1/expected_wand.rbi +9 -0
  73. data/spec/test_data/v5.1/expected_wizard.rbi +18 -0
  74. data/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +18 -0
  75. data/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +18 -0
  76. data/spec/test_data/v5.2/expected_attachment.rbi +18 -0
  77. data/spec/test_data/v5.2/expected_blob.rbi +19 -1
  78. data/spec/test_data/v5.2/expected_custom_application_job.rbi +21 -0
  79. data/spec/test_data/v5.2/expected_custom_application_mailer.rbi +6 -0
  80. data/spec/test_data/v5.2/expected_custom_award_house_point_hourglasses.rbi +21 -0
  81. data/spec/test_data/v5.2/expected_custom_daily_prophet_mailer.rbi +8 -0
  82. data/spec/test_data/v5.2/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  83. data/spec/test_data/v5.2/expected_headmaster.rbi +18 -0
  84. data/spec/test_data/v5.2/expected_potion.rbi +9 -0
  85. data/spec/test_data/v5.2/expected_robe.rbi +9 -0
  86. data/spec/test_data/v5.2/expected_school.rbi +9 -0
  87. data/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +18 -0
  88. data/spec/test_data/v5.2/expected_spell_book.rbi +9 -0
  89. data/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +18 -0
  90. data/spec/test_data/v5.2/expected_squib.rbi +38 -2
  91. data/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +18 -0
  92. data/spec/test_data/v5.2/expected_wand.rbi +9 -0
  93. data/spec/test_data/v5.2/expected_wizard.rbi +38 -2
  94. data/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +18 -0
  95. data/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +38 -2
  96. data/spec/test_data/v6.0/expected_attachment.rbi +18 -0
  97. data/spec/test_data/v6.0/expected_blob.rbi +19 -1
  98. data/spec/test_data/v6.0/expected_custom_application_job.rbi +21 -0
  99. data/spec/test_data/v6.0/expected_custom_application_mailer.rbi +6 -0
  100. data/spec/test_data/v6.0/expected_custom_award_house_point_hourglasses.rbi +21 -0
  101. data/spec/test_data/v6.0/expected_custom_daily_prophet_mailer.rbi +8 -0
  102. data/spec/test_data/v6.0/expected_custom_hogwarts_acceptance_mailer.rbi +21 -0
  103. data/spec/test_data/v6.0/expected_headmaster.rbi +18 -0
  104. data/spec/test_data/v6.0/expected_potion.rbi +9 -0
  105. data/spec/test_data/v6.0/expected_robe.rbi +9 -0
  106. data/spec/test_data/v6.0/expected_school.rbi +9 -0
  107. data/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +18 -0
  108. data/spec/test_data/v6.0/expected_spell_book.rbi +9 -0
  109. data/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +18 -0
  110. data/spec/test_data/v6.0/expected_squib.rbi +38 -2
  111. data/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +18 -0
  112. data/spec/test_data/v6.0/expected_wand.rbi +9 -0
  113. data/spec/test_data/v6.0/expected_wizard.rbi +38 -2
  114. data/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +18 -0
  115. data/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +38 -2
  116. metadata +45 -1
@@ -31,7 +31,7 @@ m = Module.new do
31
31
  bundler_version = a
32
32
  end
33
33
  next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
34
- bundler_version = $1 || ">= 0.a"
34
+ bundler_version = $1
35
35
  update_index = i
36
36
  end
37
37
  bundler_version
@@ -61,32 +61,41 @@ m = Module.new do
61
61
  end
62
62
 
63
63
  def bundler_version
64
- @bundler_version ||= begin
64
+ @bundler_version ||=
65
65
  env_var_version || cli_arg_version ||
66
- lockfile_version || "#{Gem::Requirement.default}.a"
67
- end
66
+ lockfile_version
67
+ end
68
+
69
+ def bundler_requirement
70
+ return "#{Gem::Requirement.default}.a" unless bundler_version
71
+
72
+ bundler_gem_version = Gem::Version.new(bundler_version)
73
+
74
+ requirement = bundler_gem_version.approximate_recommendation
75
+
76
+ return requirement unless Gem::Version.new(Gem::VERSION) < Gem::Version.new("2.7.0")
77
+
78
+ requirement += ".a" if bundler_gem_version.prerelease?
79
+
80
+ requirement
68
81
  end
69
82
 
70
83
  def load_bundler!
71
84
  ENV["BUNDLE_GEMFILE"] ||= gemfile
72
85
 
73
- # must dup string for RG < 1.8 compatibility
74
- activate_bundler(bundler_version.dup)
86
+ activate_bundler
75
87
  end
76
88
 
77
- def activate_bundler(bundler_version)
78
- if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
79
- bundler_version = "< 2"
80
- end
89
+ def activate_bundler
81
90
  gem_error = activation_error_handling do
82
- gem "bundler", bundler_version
91
+ gem "bundler", bundler_requirement
83
92
  end
84
93
  return if gem_error.nil?
85
94
  require_error = activation_error_handling do
86
95
  require "bundler/version"
87
96
  end
88
- return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
89
- warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
97
+ return if require_error.nil? && Gem::Requirement.new(bundler_requirement).satisfied_by?(Gem::Version.new(Bundler::VERSION))
98
+ warn "Activating bundler (#{bundler_requirement}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_requirement}'`"
90
99
  exit 42
91
100
  end
92
101
 
@@ -6,7 +6,7 @@
6
6
 
7
7
  Rails.application.configure do
8
8
  # Settings specified here will take precedence over those in config/application.rb.
9
-
9
+
10
10
  config.cache_classes = true
11
11
 
12
12
  # Do not eager load code on boot. This avoids loading your whole application
File without changes
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' jobs.
4
+ # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
+ class ApplicationJob
6
+ sig { params(_: T.untyped).void }
7
+ def self.perform_later(*_); end
8
+
9
+ sig { params(_: T.untyped).void }
10
+ def self.perform_now(*_); end
11
+
12
+ sig do
13
+ params(
14
+ wait: T.nilable(ActiveSupport::Duration),
15
+ wait_until: T.nilable(T.any(ActiveSupport::TimeWithZone, Date, Time)),
16
+ queue: T.nilable(T.any(String, Symbol)),
17
+ priority: T.nilable(Integer)
18
+ ).returns(T.self_type)
19
+ end
20
+ def self.set(wait: nil, wait_until: nil, queue: nil, priority: nil); end
21
+ end
@@ -0,0 +1,6 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class ApplicationMailer
6
+ end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' jobs.
4
+ # Please rerun bundle exec rake rails_rbi:jobs to regenerate.
5
+ class AwardHousePointHourglasses
6
+ sig { params(student: Wizard, point: Integer).void }
7
+ def self.perform_later(student:, point:); end
8
+
9
+ sig { params(student: Wizard, point: Integer).void }
10
+ def self.perform_now(student:, point:); end
11
+
12
+ sig do
13
+ params(
14
+ wait: T.nilable(ActiveSupport::Duration),
15
+ wait_until: T.nilable(T.any(ActiveSupport::TimeWithZone, Date, Time)),
16
+ queue: T.nilable(T.any(String, Symbol)),
17
+ priority: T.nilable(Integer)
18
+ ).returns(T.self_type)
19
+ end
20
+ def self.set(wait: nil, wait_until: nil, queue: nil, priority: nil); end
21
+ end
@@ -0,0 +1,8 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class DailyProphetMailer
6
+ sig { params(wizards: T::Array[Wizard], hotnews_only: T::Boolean).returns(ActionMailer::MessageDelivery) }
7
+ def self.notify_subscribers(wizards:, hotnews_only:); end
8
+ end
@@ -0,0 +1,21 @@
1
+ # typed: strong
2
+ # == Custom Generator ==
3
+ # This is an autogenerated file for Rails' mailers.
4
+ # Please rerun bundle exec rake rails_rbi:mailers to regenerate.
5
+ class HogwartsAcceptanceMailer
6
+ sig { params(student: Wizard).returns(ActionMailer::MessageDelivery) }
7
+ def self.notify(student); end
8
+
9
+ sig { params(student: T.untyped).returns(ActionMailer::MessageDelivery) }
10
+ def self.notify_retry(student); end
11
+
12
+ sig do
13
+ params(
14
+ teacher: Wizard,
15
+ note: String,
16
+ student: Wizard,
17
+ special: T::Boolean
18
+ ).returns(ActionMailer::MessageDelivery)
19
+ end
20
+ def self.notify_teacher(teacher, note = nil, student:, special: false); end
21
+ end
@@ -40,12 +40,30 @@ module Headmaster::GeneratedAssociationMethods
40
40
  sig { returns(::School) }
41
41
  def school; end
42
42
 
43
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
44
+ def build_school(*args, &block); end
45
+
46
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
47
+ def create_school(*args, &block); end
48
+
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
50
+ def create_school!(*args, &block); end
51
+
43
52
  sig { params(value: ::School).void }
44
53
  def school=(value); end
45
54
 
46
55
  sig { returns(::Wizard) }
47
56
  def wizard; end
48
57
 
58
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
59
+ def build_wizard(*args, &block); end
60
+
61
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
62
+ def create_wizard(*args, &block); end
63
+
64
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
65
+ def create_wizard!(*args, &block); end
66
+
49
67
  sig { params(value: ::Wizard).void }
50
68
  def wizard=(value); end
51
69
  end
@@ -11,6 +11,15 @@ module Potion::GeneratedAssociationMethods
11
11
  sig { returns(T.nilable(::Wizard)) }
12
12
  def wizard; end
13
13
 
14
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
15
+ def build_wizard(*args, &block); end
16
+
17
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
18
+ def create_wizard(*args, &block); end
19
+
20
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
21
+ def create_wizard!(*args, &block); end
22
+
14
23
  sig { params(value: T.nilable(::Wizard)).void }
15
24
  def wizard=(value); end
16
25
  end
@@ -31,6 +31,15 @@ module Robe::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Wizard)) }
32
32
  def wizard; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
35
+ def build_wizard(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
38
+ def create_wizard(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
41
+ def create_wizard!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Wizard)).void }
35
44
  def wizard=(value); end
36
45
  end
@@ -31,6 +31,15 @@ module School::GeneratedAssociationMethods
31
31
  sig { returns(::Headmaster) }
32
32
  def headmaster; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
35
+ def build_headmaster(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
38
+ def create_headmaster(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) }
41
+ def create_headmaster!(*args, &block); end
42
+
34
43
  sig { params(value: ::Headmaster).void }
35
44
  def headmaster=(value); end
36
45
  end
@@ -31,12 +31,30 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Spell)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Spell)).void }
35
44
  def left_side=(value); end
36
45
 
37
46
  sig { returns(::SpellBook) }
38
47
  def spell_book; end
39
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
50
+ def build_spell_book(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
53
+ def create_spell_book(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
56
+ def create_spell_book!(*args, &block); end
57
+
40
58
  sig { params(value: ::SpellBook).void }
41
59
  def spell_book=(value); end
42
60
  end
@@ -87,6 +87,15 @@ module SpellBook::GeneratedAssociationMethods
87
87
  sig { returns(::Wizard) }
88
88
  def wizard; end
89
89
 
90
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
91
+ def build_wizard(*args, &block); end
92
+
93
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
94
+ def create_wizard(*args, &block); end
95
+
96
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
97
+ def create_wizard!(*args, &block); end
98
+
90
99
  sig { params(value: ::Wizard).void }
91
100
  def wizard=(value); end
92
101
  end
@@ -31,12 +31,30 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::SpellBook)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::SpellBook)).void }
35
44
  def left_side=(value); end
36
45
 
37
46
  sig { returns(::Spell) }
38
47
  def spell; end
39
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
50
+ def build_spell(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
53
+ def create_spell(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) }
56
+ def create_spell!(*args, &block); end
57
+
40
58
  sig { params(value: ::Spell).void }
41
59
  def spell=(value); end
42
60
  end
@@ -252,6 +252,15 @@ module Squib::GeneratedAssociationMethods
252
252
  sig { returns(T.nilable(::School)) }
253
253
  def school; end
254
254
 
255
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
256
+ def build_school(*args, &block); end
257
+
258
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
259
+ def create_school(*args, &block); end
260
+
261
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
262
+ def create_school!(*args, &block); end
263
+
255
264
  sig { params(value: T.nilable(::School)).void }
256
265
  def school=(value); end
257
266
 
@@ -276,6 +285,15 @@ module Squib::GeneratedAssociationMethods
276
285
  sig { returns(T.nilable(::Wand)) }
277
286
  def wand; end
278
287
 
288
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
289
+ def build_wand(*args, &block); end
290
+
291
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
292
+ def create_wand(*args, &block); end
293
+
294
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
295
+ def create_wand!(*args, &block); end
296
+
279
297
  sig { params(value: T.nilable(::Wand)).void }
280
298
  def wand=(value); end
281
299
  end
@@ -31,12 +31,30 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Subject)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Subject)).void }
35
44
  def left_side=(value); end
36
45
 
37
46
  sig { returns(T.nilable(::Wizard)) }
38
47
  def wizard; end
39
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
50
+ def build_wizard(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
53
+ def create_wizard(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
56
+ def create_wizard!(*args, &block); end
57
+
40
58
  sig { params(value: T.nilable(::Wizard)).void }
41
59
  def wizard=(value); end
42
60
  end
@@ -166,6 +166,15 @@ module Wand::GeneratedAssociationMethods
166
166
  sig { returns(::Wizard) }
167
167
  def wizard; end
168
168
 
169
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
170
+ def build_wizard(*args, &block); end
171
+
172
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
173
+ def create_wizard(*args, &block); end
174
+
175
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
176
+ def create_wizard!(*args, &block); end
177
+
169
178
  sig { params(value: ::Wizard).void }
170
179
  def wizard=(value); end
171
180
  end
@@ -292,6 +292,15 @@ module Wizard::GeneratedAssociationMethods
292
292
  sig { returns(T.nilable(::School)) }
293
293
  def school; end
294
294
 
295
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
296
+ def build_school(*args, &block); end
297
+
298
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
299
+ def create_school(*args, &block); end
300
+
301
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) }
302
+ def create_school!(*args, &block); end
303
+
295
304
  sig { params(value: T.nilable(::School)).void }
296
305
  def school=(value); end
297
306
 
@@ -316,6 +325,15 @@ module Wizard::GeneratedAssociationMethods
316
325
  sig { returns(T.nilable(::Wand)) }
317
326
  def wand; end
318
327
 
328
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
329
+ def build_wand(*args, &block); end
330
+
331
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
332
+ def create_wand(*args, &block); end
333
+
334
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) }
335
+ def create_wand!(*args, &block); end
336
+
319
337
  sig { params(value: T.nilable(::Wand)).void }
320
338
  def wand=(value); end
321
339
  end
@@ -31,12 +31,30 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods
31
31
  sig { returns(T.nilable(::Wizard)) }
32
32
  def left_side; end
33
33
 
34
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
35
+ def build_left_side(*args, &block); end
36
+
37
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
38
+ def create_left_side(*args, &block); end
39
+
40
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) }
41
+ def create_left_side!(*args, &block); end
42
+
34
43
  sig { params(value: T.nilable(::Wizard)).void }
35
44
  def left_side=(value); end
36
45
 
37
46
  sig { returns(T.nilable(::Subject)) }
38
47
  def subject; end
39
48
 
49
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
50
+ def build_subject(*args, &block); end
51
+
52
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
53
+ def create_subject(*args, &block); end
54
+
55
+ sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) }
56
+ def create_subject!(*args, &block); end
57
+
40
58
  sig { params(value: T.nilable(::Subject)).void }
41
59
  def subject=(value); end
42
60
  end