
class Module

  # As with alias_method, but alias both reader and writer.
  #
  #   attr_accessor :x
  #   self.x = 1
  #   alias_accessor :y, :x
  #   y #=> 1
  #   self.y = 2   
  #   x #=> 2

  def alias_accessor( name, target )
    alias_method( name, target )
    alias_method( "#{name}=", "#{target}=" )
  end
                      
end

