From 8aa611954e5be727f08eee7c16e7eb1314ea0fbd Mon Sep 17 00:00:00 2001 From: Alex Ghiculescu Date: Tue, 2 Jun 2020 19:55:11 -0500 Subject: [PATCH] More has_one/belongs_to association methods (#344) Adds these: https://guides.rubyonrails.org/association_basics.html#methods-added-by-belongs-to https://guides.rubyonrails.org/association_basics.html#methods-added-by-has-one * More has_one/belongs_to association methods Adds these: - https://guides.rubyonrails.org/association_basics.html#methods-added-by-belongs-to - https://guides.rubyonrails.org/association_basics.html#methods-added-by-has-one * bump all specs * Fix broken build * update pegged sorbet version * these methods take params * bump rbi * use the spec format that matches what srb rbi is generating * update rbi accordingly --- .../model_plugins/active_record_assoc.rb | 20 +++++++++++ spec/test_data/v5.0/expected_headmaster.rbi | 18 ++++++++++ spec/test_data/v5.0/expected_potion.rbi | 9 +++++ spec/test_data/v5.0/expected_robe.rbi | 9 +++++ spec/test_data/v5.0/expected_school.rbi | 9 +++++ .../v5.0/expected_spell/habtm_spell_books.rbi | 18 ++++++++++ spec/test_data/v5.0/expected_spell_book.rbi | 9 +++++ .../v5.0/expected_spell_book/habtm_spells.rbi | 18 ++++++++++ spec/test_data/v5.0/expected_squib.rbi | 18 ++++++++++ .../v5.0/expected_subject/habtm_wizards.rbi | 18 ++++++++++ spec/test_data/v5.0/expected_wand.rbi | 9 +++++ spec/test_data/v5.0/expected_wizard.rbi | 18 ++++++++++ .../v5.0/expected_wizard/habtm_subjects.rbi | 18 ++++++++++ .../v5.0/expected_wizard_wo_spellbook.rbi | 18 ++++++++++ spec/test_data/v5.1/expected_headmaster.rbi | 18 ++++++++++ spec/test_data/v5.1/expected_potion.rbi | 9 +++++ spec/test_data/v5.1/expected_robe.rbi | 9 +++++ spec/test_data/v5.1/expected_school.rbi | 9 +++++ .../v5.1/expected_spell/habtm_spell_books.rbi | 18 ++++++++++ spec/test_data/v5.1/expected_spell_book.rbi | 9 +++++ .../v5.1/expected_spell_book/habtm_spells.rbi | 18 ++++++++++ spec/test_data/v5.1/expected_squib.rbi | 18 ++++++++++ .../v5.1/expected_subject/habtm_wizards.rbi | 18 ++++++++++ spec/test_data/v5.1/expected_wand.rbi | 9 +++++ spec/test_data/v5.1/expected_wizard.rbi | 18 ++++++++++ .../v5.1/expected_wizard/habtm_subjects.rbi | 18 ++++++++++ .../v5.1/expected_wizard_wo_spellbook.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_attachment.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_blob.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_headmaster.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_potion.rbi | 9 +++++ spec/test_data/v5.2/expected_robe.rbi | 9 +++++ spec/test_data/v5.2/expected_school.rbi | 9 +++++ .../v5.2/expected_spell/habtm_spell_books.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_spell_book.rbi | 9 +++++ .../v5.2/expected_spell_book/habtm_spells.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_squib.rbi | 36 +++++++++++++++++++ .../v5.2/expected_subject/habtm_wizards.rbi | 18 ++++++++++ spec/test_data/v5.2/expected_wand.rbi | 9 +++++ spec/test_data/v5.2/expected_wizard.rbi | 36 +++++++++++++++++++ .../v5.2/expected_wizard/habtm_subjects.rbi | 18 ++++++++++ .../v5.2/expected_wizard_wo_spellbook.rbi | 36 +++++++++++++++++++ spec/test_data/v6.0/expected_attachment.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_blob.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_headmaster.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_potion.rbi | 9 +++++ spec/test_data/v6.0/expected_robe.rbi | 9 +++++ spec/test_data/v6.0/expected_school.rbi | 9 +++++ .../v6.0/expected_spell/habtm_spell_books.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_spell_book.rbi | 9 +++++ .../v6.0/expected_spell_book/habtm_spells.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_squib.rbi | 36 +++++++++++++++++++ .../v6.0/expected_subject/habtm_wizards.rbi | 18 ++++++++++ spec/test_data/v6.0/expected_wand.rbi | 9 +++++ spec/test_data/v6.0/expected_wizard.rbi | 36 +++++++++++++++++++ .../v6.0/expected_wizard/habtm_subjects.rbi | 18 ++++++++++ .../v6.0/expected_wizard_wo_spellbook.rbi | 36 +++++++++++++++++++ 57 files changed, 956 insertions(+) diff --git a/lib/sorbet-rails/model_plugins/active_record_assoc.rb b/lib/sorbet-rails/model_plugins/active_record_assoc.rb index dc5e754c..ff08cbca 100644 --- a/lib/sorbet-rails/model_plugins/active_record_assoc.rb +++ b/lib/sorbet-rails/model_plugins/active_record_assoc.rb @@ -36,10 +36,30 @@ def populate_single_assoc_getter_setter(assoc_module_rbi, assoc_name, reflection assoc_class = assoc_should_be_untyped?(reflection) ? "T.untyped" : "::#{reflection.klass.name}" assoc_type = (belongs_to_and_required?(reflection) || has_one_and_required?(reflection)) ? assoc_class : "T.nilable(#{assoc_class})" + params = [ + Parameter.new("*args", type: "T.untyped"), + Parameter.new("&block", type: "T.nilable(T.proc.params(object: #{assoc_class}).void)") + ] + assoc_module_rbi.create_method( assoc_name.to_s, return_type: assoc_type, ) + assoc_module_rbi.create_method( + "build_#{assoc_name}", + parameters: params, + return_type: assoc_class, + ) + assoc_module_rbi.create_method( + "create_#{assoc_name}", + parameters: params, + return_type: assoc_class, + ) + assoc_module_rbi.create_method( + "create_#{assoc_name}!", + parameters: params, + return_type: assoc_class, + ) assoc_module_rbi.create_method( "#{assoc_name}=", parameters: [ diff --git a/spec/test_data/v5.0/expected_headmaster.rbi b/spec/test_data/v5.0/expected_headmaster.rbi index 69adaf2a..7d9098f9 100644 --- a/spec/test_data/v5.0/expected_headmaster.rbi +++ b/spec/test_data/v5.0/expected_headmaster.rbi @@ -40,12 +40,30 @@ module Headmaster::GeneratedAssociationMethods sig { returns(::School) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: ::School).void } def school=(value); end sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_potion.rbi b/spec/test_data/v5.0/expected_potion.rbi index 203b508a..3be0f359 100644 --- a/spec/test_data/v5.0/expected_potion.rbi +++ b/spec/test_data/v5.0/expected_potion.rbi @@ -11,6 +11,15 @@ module Potion::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_robe.rbi b/spec/test_data/v5.0/expected_robe.rbi index 83ecfea5..4175ca15 100644 --- a/spec/test_data/v5.0/expected_robe.rbi +++ b/spec/test_data/v5.0/expected_robe.rbi @@ -31,6 +31,15 @@ module Robe::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_school.rbi b/spec/test_data/v5.0/expected_school.rbi index 42ea1047..3b1ae74a 100644 --- a/spec/test_data/v5.0/expected_school.rbi +++ b/spec/test_data/v5.0/expected_school.rbi @@ -31,6 +31,15 @@ module School::GeneratedAssociationMethods sig { returns(::Headmaster) } def headmaster; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def build_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster!(*args, &block); end + sig { params(value: ::Headmaster).void } def headmaster=(value); end end diff --git a/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi b/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi index 9c8cc706..f1ed0735 100644 --- a/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi +++ b/spec/test_data/v5.0/expected_spell/habtm_spell_books.rbi @@ -31,12 +31,30 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods sig { returns(T.nilable(::Spell)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Spell)).void } def left_side=(value); end sig { returns(::SpellBook) } def spell_book; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book!(*args, &block); end + sig { params(value: ::SpellBook).void } def spell_book=(value); end end diff --git a/spec/test_data/v5.0/expected_spell_book.rbi b/spec/test_data/v5.0/expected_spell_book.rbi index a39010dd..788a666c 100644 --- a/spec/test_data/v5.0/expected_spell_book.rbi +++ b/spec/test_data/v5.0/expected_spell_book.rbi @@ -87,6 +87,15 @@ module SpellBook::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi b/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi index b509983f..6f4b5042 100644 --- a/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi +++ b/spec/test_data/v5.0/expected_spell_book/habtm_spells.rbi @@ -31,12 +31,30 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods sig { returns(T.nilable(::SpellBook)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::SpellBook)).void } def left_side=(value); end sig { returns(::Spell) } def spell; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell!(*args, &block); end + sig { params(value: ::Spell).void } def spell=(value); end end diff --git a/spec/test_data/v5.0/expected_squib.rbi b/spec/test_data/v5.0/expected_squib.rbi index 6343cc18..4456091e 100644 --- a/spec/test_data/v5.0/expected_squib.rbi +++ b/spec/test_data/v5.0/expected_squib.rbi @@ -252,6 +252,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end @@ -276,6 +285,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi b/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi index 50e9f8bf..f2bf20c3 100644 --- a/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi +++ b/spec/test_data/v5.0/expected_subject/habtm_wizards.rbi @@ -31,12 +31,30 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods sig { returns(T.nilable(::Subject)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def left_side=(value); end sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_wand.rbi b/spec/test_data/v5.0/expected_wand.rbi index 20e2036f..8ce70487 100644 --- a/spec/test_data/v5.0/expected_wand.rbi +++ b/spec/test_data/v5.0/expected_wand.rbi @@ -166,6 +166,15 @@ module Wand::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.0/expected_wizard.rbi b/spec/test_data/v5.0/expected_wizard.rbi index ffe575c0..1d6b990a 100644 --- a/spec/test_data/v5.0/expected_wizard.rbi +++ b/spec/test_data/v5.0/expected_wizard.rbi @@ -292,6 +292,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end @@ -316,6 +325,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi b/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi index 2677667e..97c0f82f 100644 --- a/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi +++ b/spec/test_data/v5.0/expected_wizard/habtm_subjects.rbi @@ -31,12 +31,30 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def left_side=(value); end sig { returns(T.nilable(::Subject)) } def subject; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def subject=(value); end end diff --git a/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi b/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi index ed911acc..74097e36 100644 --- a/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi +++ b/spec/test_data/v5.0/expected_wizard_wo_spellbook.rbi @@ -292,6 +292,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(T.untyped)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(T.untyped)).void } def school=(value); end @@ -310,6 +319,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.1/expected_headmaster.rbi b/spec/test_data/v5.1/expected_headmaster.rbi index d9982808..f67f5025 100644 --- a/spec/test_data/v5.1/expected_headmaster.rbi +++ b/spec/test_data/v5.1/expected_headmaster.rbi @@ -40,12 +40,30 @@ module Headmaster::GeneratedAssociationMethods sig { returns(::School) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: ::School).void } def school=(value); end sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_potion.rbi b/spec/test_data/v5.1/expected_potion.rbi index ffa89aa6..cb432c24 100644 --- a/spec/test_data/v5.1/expected_potion.rbi +++ b/spec/test_data/v5.1/expected_potion.rbi @@ -11,6 +11,15 @@ module Potion::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_robe.rbi b/spec/test_data/v5.1/expected_robe.rbi index 0ca6ebf9..7c0c482a 100644 --- a/spec/test_data/v5.1/expected_robe.rbi +++ b/spec/test_data/v5.1/expected_robe.rbi @@ -31,6 +31,15 @@ module Robe::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_school.rbi b/spec/test_data/v5.1/expected_school.rbi index 82c1745f..a4cb57f2 100644 --- a/spec/test_data/v5.1/expected_school.rbi +++ b/spec/test_data/v5.1/expected_school.rbi @@ -31,6 +31,15 @@ module School::GeneratedAssociationMethods sig { returns(::Headmaster) } def headmaster; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def build_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster!(*args, &block); end + sig { params(value: ::Headmaster).void } def headmaster=(value); end end diff --git a/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi b/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi index 7c9a7dcd..c1ec23de 100644 --- a/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi +++ b/spec/test_data/v5.1/expected_spell/habtm_spell_books.rbi @@ -31,12 +31,30 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods sig { returns(T.nilable(::Spell)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Spell)).void } def left_side=(value); end sig { returns(::SpellBook) } def spell_book; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book!(*args, &block); end + sig { params(value: ::SpellBook).void } def spell_book=(value); end end diff --git a/spec/test_data/v5.1/expected_spell_book.rbi b/spec/test_data/v5.1/expected_spell_book.rbi index e538b5d5..fd9bfe81 100644 --- a/spec/test_data/v5.1/expected_spell_book.rbi +++ b/spec/test_data/v5.1/expected_spell_book.rbi @@ -87,6 +87,15 @@ module SpellBook::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi b/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi index f0c607dd..65fe80ba 100644 --- a/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi +++ b/spec/test_data/v5.1/expected_spell_book/habtm_spells.rbi @@ -31,12 +31,30 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods sig { returns(T.nilable(::SpellBook)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::SpellBook)).void } def left_side=(value); end sig { returns(::Spell) } def spell; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell!(*args, &block); end + sig { params(value: ::Spell).void } def spell=(value); end end diff --git a/spec/test_data/v5.1/expected_squib.rbi b/spec/test_data/v5.1/expected_squib.rbi index 7692e528..db3ecb16 100644 --- a/spec/test_data/v5.1/expected_squib.rbi +++ b/spec/test_data/v5.1/expected_squib.rbi @@ -252,6 +252,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end @@ -276,6 +285,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi b/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi index f5046ee9..f295084b 100644 --- a/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi +++ b/spec/test_data/v5.1/expected_subject/habtm_wizards.rbi @@ -31,12 +31,30 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods sig { returns(T.nilable(::Subject)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def left_side=(value); end sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_wand.rbi b/spec/test_data/v5.1/expected_wand.rbi index 63fa4828..2f0c1f2d 100644 --- a/spec/test_data/v5.1/expected_wand.rbi +++ b/spec/test_data/v5.1/expected_wand.rbi @@ -166,6 +166,15 @@ module Wand::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.1/expected_wizard.rbi b/spec/test_data/v5.1/expected_wizard.rbi index b3df36fc..cc04ef86 100644 --- a/spec/test_data/v5.1/expected_wizard.rbi +++ b/spec/test_data/v5.1/expected_wizard.rbi @@ -292,6 +292,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end @@ -316,6 +325,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi b/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi index b2e64605..8fb162d7 100644 --- a/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi +++ b/spec/test_data/v5.1/expected_wizard/habtm_subjects.rbi @@ -31,12 +31,30 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def left_side=(value); end sig { returns(T.nilable(::Subject)) } def subject; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def subject=(value); end end diff --git a/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi b/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi index 224f0dce..cbd51771 100644 --- a/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi +++ b/spec/test_data/v5.1/expected_wizard_wo_spellbook.rbi @@ -292,6 +292,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(T.untyped)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(T.untyped)).void } def school=(value); end @@ -310,6 +319,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.2/expected_attachment.rbi b/spec/test_data/v5.2/expected_attachment.rbi index cb2b9a5e..2d517992 100644 --- a/spec/test_data/v5.2/expected_attachment.rbi +++ b/spec/test_data/v5.2/expected_attachment.rbi @@ -11,12 +11,30 @@ module ActiveStorage::Attachment::GeneratedAssociationMethods sig { returns(::ActiveStorage::Blob) } def blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_blob!(*args, &block); end + sig { params(value: ::ActiveStorage::Blob).void } def blob=(value); end sig { returns(T.untyped) } def record; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_record(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_record(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_record!(*args, &block); end + sig { params(value: T.untyped).void } def record=(value); end end diff --git a/spec/test_data/v5.2/expected_blob.rbi b/spec/test_data/v5.2/expected_blob.rbi index 5a5820f0..bc0125ac 100644 --- a/spec/test_data/v5.2/expected_blob.rbi +++ b/spec/test_data/v5.2/expected_blob.rbi @@ -20,12 +20,30 @@ module ActiveStorage::Blob::GeneratedAssociationMethods sig { returns(T.nilable(::ActiveStorage::Attachment)) } def preview_image_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_preview_image_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_preview_image_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_preview_image_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def preview_image_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def preview_image_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_preview_image_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_preview_image_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_preview_image_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def preview_image_blob=(value); end end diff --git a/spec/test_data/v5.2/expected_headmaster.rbi b/spec/test_data/v5.2/expected_headmaster.rbi index d9982808..f67f5025 100644 --- a/spec/test_data/v5.2/expected_headmaster.rbi +++ b/spec/test_data/v5.2/expected_headmaster.rbi @@ -40,12 +40,30 @@ module Headmaster::GeneratedAssociationMethods sig { returns(::School) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: ::School).void } def school=(value); end sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_potion.rbi b/spec/test_data/v5.2/expected_potion.rbi index ffa89aa6..cb432c24 100644 --- a/spec/test_data/v5.2/expected_potion.rbi +++ b/spec/test_data/v5.2/expected_potion.rbi @@ -11,6 +11,15 @@ module Potion::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_robe.rbi b/spec/test_data/v5.2/expected_robe.rbi index 0ca6ebf9..7c0c482a 100644 --- a/spec/test_data/v5.2/expected_robe.rbi +++ b/spec/test_data/v5.2/expected_robe.rbi @@ -31,6 +31,15 @@ module Robe::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_school.rbi b/spec/test_data/v5.2/expected_school.rbi index 82c1745f..a4cb57f2 100644 --- a/spec/test_data/v5.2/expected_school.rbi +++ b/spec/test_data/v5.2/expected_school.rbi @@ -31,6 +31,15 @@ module School::GeneratedAssociationMethods sig { returns(::Headmaster) } def headmaster; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def build_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster!(*args, &block); end + sig { params(value: ::Headmaster).void } def headmaster=(value); end end diff --git a/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi b/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi index 7c9a7dcd..c1ec23de 100644 --- a/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi +++ b/spec/test_data/v5.2/expected_spell/habtm_spell_books.rbi @@ -31,12 +31,30 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods sig { returns(T.nilable(::Spell)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Spell)).void } def left_side=(value); end sig { returns(::SpellBook) } def spell_book; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book!(*args, &block); end + sig { params(value: ::SpellBook).void } def spell_book=(value); end end diff --git a/spec/test_data/v5.2/expected_spell_book.rbi b/spec/test_data/v5.2/expected_spell_book.rbi index e538b5d5..fd9bfe81 100644 --- a/spec/test_data/v5.2/expected_spell_book.rbi +++ b/spec/test_data/v5.2/expected_spell_book.rbi @@ -87,6 +87,15 @@ module SpellBook::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi b/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi index f0c607dd..65fe80ba 100644 --- a/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi +++ b/spec/test_data/v5.2/expected_spell_book/habtm_spells.rbi @@ -31,12 +31,30 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods sig { returns(T.nilable(::SpellBook)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::SpellBook)).void } def left_side=(value); end sig { returns(::Spell) } def spell; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell!(*args, &block); end + sig { params(value: ::Spell).void } def spell=(value); end end diff --git a/spec/test_data/v5.2/expected_squib.rbi b/spec/test_data/v5.2/expected_squib.rbi index 48f72bf8..19b14bad 100644 --- a/spec/test_data/v5.2/expected_squib.rbi +++ b/spec/test_data/v5.2/expected_squib.rbi @@ -270,18 +270,45 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -306,6 +333,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi b/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi index f5046ee9..f295084b 100644 --- a/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi +++ b/spec/test_data/v5.2/expected_subject/habtm_wizards.rbi @@ -31,12 +31,30 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods sig { returns(T.nilable(::Subject)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def left_side=(value); end sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_wand.rbi b/spec/test_data/v5.2/expected_wand.rbi index e8ea6c17..095c2335 100644 --- a/spec/test_data/v5.2/expected_wand.rbi +++ b/spec/test_data/v5.2/expected_wand.rbi @@ -184,6 +184,15 @@ module Wand::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v5.2/expected_wizard.rbi b/spec/test_data/v5.2/expected_wizard.rbi index 695a774c..ac4b90e1 100644 --- a/spec/test_data/v5.2/expected_wizard.rbi +++ b/spec/test_data/v5.2/expected_wizard.rbi @@ -310,18 +310,45 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -346,6 +373,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi b/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi index b2e64605..8fb162d7 100644 --- a/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi +++ b/spec/test_data/v5.2/expected_wizard/habtm_subjects.rbi @@ -31,12 +31,30 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def left_side=(value); end sig { returns(T.nilable(::Subject)) } def subject; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def subject=(value); end end diff --git a/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi b/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi index d042bda0..886493cb 100644 --- a/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi +++ b/spec/test_data/v5.2/expected_wizard_wo_spellbook.rbi @@ -310,18 +310,45 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(T.untyped)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(T.untyped)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -340,6 +367,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end end diff --git a/spec/test_data/v6.0/expected_attachment.rbi b/spec/test_data/v6.0/expected_attachment.rbi index af008515..f0a3963e 100644 --- a/spec/test_data/v6.0/expected_attachment.rbi +++ b/spec/test_data/v6.0/expected_attachment.rbi @@ -11,12 +11,30 @@ module ActiveStorage::Attachment::GeneratedAssociationMethods sig { returns(::ActiveStorage::Blob) } def blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_blob!(*args, &block); end + sig { params(value: ::ActiveStorage::Blob).void } def blob=(value); end sig { returns(T.untyped) } def record; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_record(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_record(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_record!(*args, &block); end + sig { params(value: T.untyped).void } def record=(value); end end diff --git a/spec/test_data/v6.0/expected_blob.rbi b/spec/test_data/v6.0/expected_blob.rbi index 5fbfc3fa..8eea6b0a 100644 --- a/spec/test_data/v6.0/expected_blob.rbi +++ b/spec/test_data/v6.0/expected_blob.rbi @@ -326,12 +326,30 @@ module ActiveStorage::Blob::GeneratedAssociationMethods sig { returns(T.nilable(::ActiveStorage::Attachment)) } def preview_image_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_preview_image_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_preview_image_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_preview_image_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def preview_image_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def preview_image_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_preview_image_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_preview_image_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_preview_image_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def preview_image_blob=(value); end diff --git a/spec/test_data/v6.0/expected_headmaster.rbi b/spec/test_data/v6.0/expected_headmaster.rbi index 40f08191..07908a88 100644 --- a/spec/test_data/v6.0/expected_headmaster.rbi +++ b/spec/test_data/v6.0/expected_headmaster.rbi @@ -40,12 +40,30 @@ module Headmaster::GeneratedAssociationMethods sig { returns(::School) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: ::School).void } def school=(value); end sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_potion.rbi b/spec/test_data/v6.0/expected_potion.rbi index 6e722a73..79fd660b 100644 --- a/spec/test_data/v6.0/expected_potion.rbi +++ b/spec/test_data/v6.0/expected_potion.rbi @@ -11,6 +11,15 @@ module Potion::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_robe.rbi b/spec/test_data/v6.0/expected_robe.rbi index 20448cef..3d47070f 100644 --- a/spec/test_data/v6.0/expected_robe.rbi +++ b/spec/test_data/v6.0/expected_robe.rbi @@ -31,6 +31,15 @@ module Robe::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_school.rbi b/spec/test_data/v6.0/expected_school.rbi index cfc74d51..b1a29084 100644 --- a/spec/test_data/v6.0/expected_school.rbi +++ b/spec/test_data/v6.0/expected_school.rbi @@ -31,6 +31,15 @@ module School::GeneratedAssociationMethods sig { returns(::Headmaster) } def headmaster; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def build_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Headmaster).void)).returns(::Headmaster) } + def create_headmaster!(*args, &block); end + sig { params(value: ::Headmaster).void } def headmaster=(value); end end diff --git a/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi b/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi index fae9de22..e08d7c4e 100644 --- a/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi +++ b/spec/test_data/v6.0/expected_spell/habtm_spell_books.rbi @@ -31,12 +31,30 @@ module Spell::HABTM_SpellBooks::GeneratedAssociationMethods sig { returns(T.nilable(::Spell)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Spell)).void } def left_side=(value); end sig { returns(::SpellBook) } def spell_book; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_spell_book!(*args, &block); end + sig { params(value: ::SpellBook).void } def spell_book=(value); end end diff --git a/spec/test_data/v6.0/expected_spell_book.rbi b/spec/test_data/v6.0/expected_spell_book.rbi index ebd71517..0edc37d2 100644 --- a/spec/test_data/v6.0/expected_spell_book.rbi +++ b/spec/test_data/v6.0/expected_spell_book.rbi @@ -87,6 +87,15 @@ module SpellBook::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi b/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi index ae503bdb..c237ea19 100644 --- a/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi +++ b/spec/test_data/v6.0/expected_spell_book/habtm_spells.rbi @@ -31,12 +31,30 @@ module SpellBook::HABTM_Spells::GeneratedAssociationMethods sig { returns(T.nilable(::SpellBook)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::SpellBook).void)).returns(::SpellBook) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::SpellBook)).void } def left_side=(value); end sig { returns(::Spell) } def spell; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def build_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Spell).void)).returns(::Spell) } + def create_spell!(*args, &block); end + sig { params(value: ::Spell).void } def spell=(value); end end diff --git a/spec/test_data/v6.0/expected_squib.rbi b/spec/test_data/v6.0/expected_squib.rbi index 67f176d2..c17e1eaf 100644 --- a/spec/test_data/v6.0/expected_squib.rbi +++ b/spec/test_data/v6.0/expected_squib.rbi @@ -1016,18 +1016,45 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -1052,6 +1079,15 @@ module Squib::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end diff --git a/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi b/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi index 45b892e8..bade8fb5 100644 --- a/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi +++ b/spec/test_data/v6.0/expected_subject/habtm_wizards.rbi @@ -31,12 +31,30 @@ module Subject::HABTM_Wizards::GeneratedAssociationMethods sig { returns(T.nilable(::Subject)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def left_side=(value); end sig { returns(T.nilable(::Wizard)) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_wand.rbi b/spec/test_data/v6.0/expected_wand.rbi index 7e137605..349b4ff8 100644 --- a/spec/test_data/v6.0/expected_wand.rbi +++ b/spec/test_data/v6.0/expected_wand.rbi @@ -184,6 +184,15 @@ module Wand::GeneratedAssociationMethods sig { returns(::Wizard) } def wizard; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_wizard!(*args, &block); end + sig { params(value: ::Wizard).void } def wizard=(value); end end diff --git a/spec/test_data/v6.0/expected_wizard.rbi b/spec/test_data/v6.0/expected_wizard.rbi index 197e4955..64a0eea6 100644 --- a/spec/test_data/v6.0/expected_wizard.rbi +++ b/spec/test_data/v6.0/expected_wizard.rbi @@ -1092,18 +1092,45 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::School)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::School).void)).returns(::School) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(::School)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -1128,6 +1155,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end diff --git a/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi b/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi index 88666865..092b54df 100644 --- a/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi +++ b/spec/test_data/v6.0/expected_wizard/habtm_subjects.rbi @@ -31,12 +31,30 @@ module Wizard::HABTM_Subjects::GeneratedAssociationMethods sig { returns(T.nilable(::Wizard)) } def left_side; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def build_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wizard).void)).returns(::Wizard) } + def create_left_side!(*args, &block); end + sig { params(value: T.nilable(::Wizard)).void } def left_side=(value); end sig { returns(T.nilable(::Subject)) } def subject; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def build_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Subject).void)).returns(::Subject) } + def create_subject!(*args, &block); end + sig { params(value: T.nilable(::Subject)).void } def subject=(value); end end diff --git a/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi b/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi index 46f85060..c0e53763 100644 --- a/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi +++ b/spec/test_data/v6.0/expected_wizard_wo_spellbook.rbi @@ -1092,18 +1092,45 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(T.untyped)) } def school; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def build_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: T.untyped).void)).returns(T.untyped) } + def create_school!(*args, &block); end + sig { params(value: T.nilable(T.untyped)).void } def school=(value); end sig { returns(T.nilable(::ActiveStorage::Attachment)) } def school_photo_attachment; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def build_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Attachment).void)).returns(::ActiveStorage::Attachment) } + def create_school_photo_attachment!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Attachment)).void } def school_photo_attachment=(value); end sig { returns(T.nilable(::ActiveStorage::Blob)) } def school_photo_blob; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def build_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::ActiveStorage::Blob).void)).returns(::ActiveStorage::Blob) } + def create_school_photo_blob!(*args, &block); end + sig { params(value: T.nilable(::ActiveStorage::Blob)).void } def school_photo_blob=(value); end @@ -1122,6 +1149,15 @@ module Wizard::GeneratedAssociationMethods sig { returns(T.nilable(::Wand)) } def wand; end + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def build_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand(*args, &block); end + + sig { params(args: T.untyped, block: T.nilable(T.proc.params(object: ::Wand).void)).returns(::Wand) } + def create_wand!(*args, &block); end + sig { params(value: T.nilable(::Wand)).void } def wand=(value); end