pocke / rbs_rails

Apache License 2.0
282 stars 33 forks source link

Support return types of #pluck (single argument only) #273

Open tk0miya opened 9 months ago

tk0miya commented 9 months ago

This generates signatures for ActiveRecord::Base#pluck to give detailed types if it takes a specific column name as its argument.

ex.

User.pluck(:id)    #=> Array[Integer]
User.pluck(:name)  #=> Array[String]

Note: This only supports single argument calls.