lib/yard/docstring_parser.rb in yard-0.8.1 vs lib/yard/docstring_parser.rb in yard-0.8.2

- old
+ new

@@ -27,29 +27,29 @@ # @see #parse_content # @since 0.8.0 class DocstringParser # @return [String] the parsed text portion of the docstring, # with tags removed. - attr_reader :text + attr_accessor :text # @return [String] the complete input string to the parser. - attr_reader :raw_text + attr_accessor :raw_text # @return [Array<Tag>] the list of meta-data tags identified # by the parser - attr_reader :tags + attr_accessor :tags # @return [Array<Directive>] a list of directives identified # by the parser. This list will not be passed on to the # Docstring object. - attr_reader :directives + attr_accessor :directives # @return [OpenStruct] any arbitrary state to be passed between # tags during parsing. Mainly used by directives to coordinate # behaviour (so that directives can be aware of other directives # used in a docstring). - attr_reader :state + attr_accessor :state # @return [CodeObjects::Base, nil] the object associated with # the docstring being parsed. May be nil if the docstring is # not attached to any object. attr_accessor :object @@ -175,11 +175,11 @@ # @!group Tag Manipulation Methods # Creates a tag from the {Tags::DefaultFactory tag factory}. # - # To add an already created tag object, use {#add_tag} + # To add an already created tag object, append it to {#tags}. # # @param [String] tag_name the tag name # @param [String] tag_buf the text attached to the tag with newlines removed. # @return [Tags::Tag, Tags::RefTag] a tag def create_tag(tag_name, tag_buf = '') @@ -262,10 +262,10 @@ # @return [void] def self.after_parse(&block) self.after_parse_callbacks << block end - # @return [Array<Proc>] the {#after_parse} callback proc objects + # @return [Array<Proc>] the {after_parse} callback proc objects def self.after_parse_callbacks @after_parse_callbacks ||= [] end # Define a callback to check that @param tags are properly named