add_attribute

add_attribute(attribute)
Instance Public methods

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.

doc_ruby_on_rails
2015-05-01 16:13:15
Comments
Leave a Comment

Please login to continue.