Alias_accessor

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?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs