• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/ruby-106/ruby/lib/rdoc/

Lines Matching refs:text

2 # A comment holds the text comment for a RDoc::CodeObject and provides a
31 # The text for this comment
33 attr_reader :text
36 # Overrides the content returned by #parse. Use when there is no #text
42 # Creates a new comment with +text+ that is found in the RDoc::TopLevel
45 def initialize text = nil, location = nil
47 @text = text
59 @text = copy.text.dup
64 other.text == @text and other.location == @location
88 if @text =~ /^\s*:?call-seq:(.*?(?:\S).*?)^\s*$/m then
104 if @text[seq_stop..-1] =~ re then
110 seq = @text[seq_start..seq_stop]
112 @text.slice! all_start...all_stop
116 elsif @text.sub!(/^\s*:?call-seq:(.*?)(^\s*$|\z)/m, '') then
121 #elsif @text.sub!(/\A\/\*\s*call-seq:(.*?)\*\/\Z/, '') then
129 # A comment is empty if its text String is empty.
132 @text.empty?
139 @text.force_encoding encoding
153 "#<%s:%x %s %p>" % [self.class, object_id, location, @text]
157 # Normalizes the text. See RDoc::Text#normalize_comment for details
160 return self unless @text
163 @text = normalize_comment @text
171 # Was this text normalized?
179 # cached until the text is changed.
184 @document = super @text, @format
205 empty.force_encoding @text.encoding if Object.const_defined? :Encoding
207 @text = @text.gsub(%r%^\s*([#*]?)--.*?^\s*(\1)\+\+\n?%m, empty)
208 @text = @text.sub(%r%^\s*[#*]?--.*%m, '')
212 # Replaces this comment's text with +text+ and resets the parsed document.
214 # An error is raised if the comment contains a document but no text.
216 def text= text
218 @text.nil? and @document
221 @text = text