diff options
author | aycabta <aycabta@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 06:28:20 +0000 |
---|---|---|
committer | aycabta <aycabta@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-10-17 06:28:20 +0000 |
commit | 1b43644edc85a93bfc9228588c065c87f975cd93 (patch) | |
tree | ef3a60d0cbe73d15b39f6160853df9a23239a574 /lib/rdoc/top_level.rb | |
parent | 2a59b579fed2fd49973ca73890f182299262909f (diff) |
Merge rdoc-6.1.0.beta2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rdoc/top_level.rb')
-rw-r--r-- | lib/rdoc/top_level.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/rdoc/top_level.rb b/lib/rdoc/top_level.rb index 6186722772..b8b6110bb2 100644 --- a/lib/rdoc/top_level.rb +++ b/lib/rdoc/top_level.rb @@ -33,7 +33,7 @@ class RDoc::TopLevel < RDoc::Context ## # The parser class that processed this file - attr_accessor :parser + attr_reader :parser ## # Creates a new TopLevel for the file at +absolute_name+. If documentation @@ -52,6 +52,12 @@ class RDoc::TopLevel < RDoc::Context @classes_or_modules = [] end + def parser=(val) + @parser = val + @store.update_parser_of_file(absolute_name, val) if @store + @parser + end + ## # An RDoc::TopLevel is equal to another with the same relative_name @@ -272,7 +278,7 @@ class RDoc::TopLevel < RDoc::Context # Is this TopLevel from a text file instead of a source code file? def text? - @parser and @parser.ancestors.include? RDoc::Parser::Text + @parser and @parser.include? RDoc::Parser::Text end def to_s # :nodoc: |