pocke / rbs_rails

Apache License 2.0
285 stars 33 forks source link

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

Open tk0miya opened 10 months ago

tk0miya commented 10 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.