I was reading source code of mattr_accessor and cattr_accessor in
ActiveSupport and found out that the method definitions are all most
identical. Except cattr_writer accepts a optional block.
I googled and read
That guy had the same question as me, but no one answered the question
Module is the superclass of Class, is there any possible that just
define mattr_accessor in Module and
alias_method cattr_accessor, mattr_accessor
I think it's more DRY right?
Can anyone help me?
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.