Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
attr_accessor をどのように拡張できますか。出来ますか?
インスタンス変数をチェックするには、attr_reader で十分です。attr_accessor は必要ありません。
クラス用に拡張するための基本的な式は次のようになると思います。
class SomeClass def self.attr_accessor(param) ...some code... end end