Method: RDoc::Parser::Ruby#parse_comment_attr

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

#parse_comment_attr(container, type, name, comment) ⇒ Object

Parse a comment that is describing an attribute in container with the given name and comment.



1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
# File 'lib/rdoc/parser/ruby.rb', line 1093

def parse_comment_attr container, type, name, comment # :nodoc:
  return if name.empty?

  rw = case type
       when 'attr_reader' then 'R'
       when 'attr_writer' then 'W'
       else 'RW'
       end

  create_attr container, NORMAL, name, rw, comment
end