Skip to content

Commit

Permalink
Merge pull request #290 from NuzzContribs/marknuzz/ar-relation-each
Browse files Browse the repository at this point in the history
Add annotation for ActiveRecord::Relation#each
  • Loading branch information
amomchilov authored Oct 15, 2024
2 parents af4f13d + 26765f0 commit f99caa1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rbi/annotations/activerecord.rbi
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,12 @@ class ActiveRecord::Base
end

class ActiveRecord::Relation
Elem = type_member(:out) { { fixed: T.untyped } }

sig { returns(T::Boolean) }
def blank?; end

sig { abstract.params(blk: T.proc.params(arg0: Elem).returns(BasicObject)).returns(T.untyped) }
sig { abstract.returns(T::Enumerator[Elem]) }
def each(&blk); end
end

0 comments on commit f99caa1

Please sign in to comment.