背景
モデルにDBのカラム名と同名のインスタンスメソッドを定義し、さらにそのメソッド内でカラムを参照したい
方法
2つ方法がある模様
class Person < ApplicationRecord
  def name
    self[:name]
  end
  def name
    read_attribute(:name)
  end
end
The Rails Style Guide では、self[:name]のほうをお勧めしている
参考
https://github.com/satour/rails-style-guide/blob/master/README-jaJA.md#read-attribute
https://stackoverrun.com/ja/q/5968719