Method: RDoc::Parser::C#add_alias

Defined in:
lib/rdoc/parser/c.rb

#add_alias(var_name, class_obj, old_name, new_name, comment) ⇒ Object

Add alias, either from a direct alias definition, or from two method that reference the same function.



250
251
252
253
254
255
256
257
258
# File 'lib/rdoc/parser/c.rb', line 250

def add_alias(var_name, class_obj, old_name, new_name, comment)
  al = RDoc::Alias.new '', old_name, new_name, ''
  al.singleton = @singleton_classes.key? var_name
  al.comment = comment
  al.record_location @top_level
  class_obj.add_alias al
  @stats.add_alias al
  al
end