class RDoc::Alias

def <=>(other)

def <=>(other)
  [@singleton ? 0 : 1, new_name] <=> [other.singleton ? 0 : 1, other.new_name]
end

def aref

def aref
  type = singleton ? 'c' : 'i'
  "#alias-#{type}-#{html_name}"
end

def full_old_name

def full_old_name
  @full_name || "#{parent.name}#{pretty_old_name}"
end

def html_name

def html_name
  CGI.escape(@new_name.gsub('-', '-2D')).gsub('%', '-').sub(/^-/, '')
end

def initialize(text, old_name, new_name, comment, singleton = false)

def initialize(text, old_name, new_name, comment, singleton = false)
  super()
  @text = text
  @singleton = singleton
  @old_name = old_name
  @new_name = new_name
  self.comment = comment
end

def inspect # :nodoc:

:nodoc:
def inspect # :nodoc:
  parent_name = parent ? parent.name : '(unknown)'
  "#<%s:0x%x %s.alias_method %s, %s>" % [
    self.class, object_id,
    parent_name, @old_name, @new_name,
  ]
end

def name_prefix

def name_prefix
  singleton ? '::' : '#'
end

def pretty_new_name

def pretty_new_name
  "#{singleton ? '::' : '#'}#{@new_name}"
end

def pretty_old_name

def pretty_old_name
  "#{singleton ? '::' : '#'}#{@old_name}"
end

def to_s # :nodoc:

:nodoc:
def to_s # :nodoc:
  "alias: #{self.new_name} -> #{self.pretty_old_name} in: #{parent}"
end