mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge rdoc-6.1.0.beta2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65106 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
2a59b579fe
commit
1b43644edc
38 changed files with 602 additions and 528 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue