Method: RDoc::Attr#add_alias
- Defined in:
- lib/rdoc/code_object/attr.rb
#add_alias(an_alias, context) ⇒ Object
Add an_alias
as an attribute in context
.
46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/rdoc/code_object/attr.rb', line 46 def add_alias(an_alias, context) new_attr = self.class.new(self.text, an_alias.new_name, self.rw, self.comment, self.singleton) new_attr.record_location an_alias.file new_attr.visibility = self.visibility new_attr.is_alias_for = self @aliases << new_attr context.add_attribute new_attr new_attr end |