method

define_read_method

define_read_method(method_name, attr_name, column)
private

Define an attribute reader method. Cope with nil column. method_name is the same as attr_name except when a non-standard primary key is used, we still define #id as an accessor for the key