method

add_attribute

v1_9_3_392 - Show latest stable - Class: RDoc::Context
add_attribute(attribute)
public

Adds attribute if not already there. If it is (as method(s) or attribute), updates the comment if it was empty.

The attribute is registered only if it defines a new method. For instance, attr_reader :foo will not be registered if method foo exists, but attr_accessor :foo will be registered if method foo exists, but foo= does not.