lib/tapioca/compilers/dsl/active_resource.rb in tapioca-0.4.10 vs lib/tapioca/compilers/dsl/active_resource.rb in tapioca-0.4.11

- old
+ new

@@ -11,12 +11,12 @@ module Tapioca module Compilers module Dsl # `Tapioca::Compilers::Dsl::ActiveResource` decorates RBI files for subclasses of - # `ActiveResource::Base` which declare `schema` fields - # (see https://github.com/rails/activeresource). + # [`ActiveResource::Base`](https://github.com/rails/activeresource) which declare + # `schema` fields. # # For example, with the following `ActiveResource::Base` subclass: # # ~~~rb # class Post < ActiveResource::Base @@ -69,12 +69,13 @@ constant: T.class_of(::ActiveResource::Base) ).void end def decorate(root, constant) return if constant.schema.blank? - root.path(constant) do |klass| + + root.path(constant) do |resource| constant.schema.each do |attribute, type| - create_schema_methods(klass, attribute, type) + create_schema_methods(resource, attribute, type) end end end sig { override.returns(T::Enumerable[Module]) }