alias_accessor

T

Trans

I don't understand why something like this isn't in core.

class Module

def alias_accessor(new, old)
alias_method(new, old)
alias_method("#{new}=", "#{old}=")
end

end

Is there some other way to handle this that I'm missing?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,201
Messages
2,571,049
Members
47,655
Latest member
eizareri

Latest Threads

Top