X7ROOT File Manager
Current Path:
/opt/alt/ruby19/lib64/ruby/1.9.1/rdoc/markup
opt
/
alt
/
ruby19
/
lib64
/
ruby
/
1.9.1
/
rdoc
/
markup
/
ðŸ“
..
📄
attribute_manager.rb
(7.8 KB)
📄
blank_line.rb
(361 B)
📄
document.rb
(2.42 KB)
📄
formatter.rb
(3.3 KB)
📄
formatter_test_case.rb
(15.71 KB)
📄
heading.rb
(314 B)
📄
indented_paragraph.rb
(534 B)
📄
inline.rb
(2.76 KB)
📄
list.rb
(1.08 KB)
📄
list_item.rb
(1.26 KB)
📄
paragraph.rb
(191 B)
📄
parser.rb
(12.65 KB)
📄
pre_process.rb
(6.33 KB)
📄
raw.rb
(965 B)
📄
rule.rb
(285 B)
📄
text_formatter_test_case.rb
(2.53 KB)
📄
to_ansi.rb
(1.79 KB)
📄
to_bs.rb
(1.7 KB)
📄
to_html.rb
(6.66 KB)
📄
to_html_crossref.rb
(3.34 KB)
📄
to_rdoc.rb
(5.58 KB)
📄
to_test.rb
(1.16 KB)
📄
to_tt_only.rb
(2.11 KB)
📄
verbatim.rb
(634 B)
Editing: document.rb
## # A Document containing lists, headings, paragraphs, etc. class RDoc::Markup::Document ## # The file this document was created from. See also # RDoc::ClassModule#add_comment attr_accessor :file ## # The parts of the Document attr_reader :parts ## # Creates a new Document with +parts+ def initialize *parts @parts = [] @parts.push(*parts) @file = nil end ## # Appends +part+ to the document def << part case part when RDoc::Markup::Document then unless part.empty? then parts.push(*part.parts) parts << RDoc::Markup::BlankLine.new end when String then raise ArgumentError, "expected RDoc::Markup::Document and friends, got String" unless part.empty? else parts << part end end def == other # :nodoc: self.class == other.class and @file == other.file and @parts == other.parts end ## # Runs this document and all its #items through +visitor+ def accept visitor visitor.start_accepting @parts.each do |item| case item when RDoc::Markup::Document then # HACK visitor.accept_document item else item.accept visitor end end visitor.end_accepting end ## # Does this document have no parts? def empty? @parts.empty? or (@parts.length == 1 and merged? and @parts.first.empty?) end ## # When this is a collection of documents (#file is not set and this document # contains only other documents as its direct children) #merge replaces # documents in this class with documents from +other+ when the file matches # and adds documents from +other+ when the files do not. # # The information in +other+ is preferred over the receiver def merge other if empty? then @parts = other.parts return self end other.parts.each do |other_part| self.parts.delete_if do |self_part| self_part.file and self_part.file == other_part.file end self.parts << other_part end self end ## # Does this Document contain other Documents? def merged? RDoc::Markup::Document === @parts.first end def pretty_print q # :nodoc: start = @file ? "[doc (#{@file}): " : '[doc: ' q.group 2, start, ']' do q.seplist @parts do |part| q.pp part end end end ## # Appends +parts+ to the document def push *parts self.parts.push(*parts) end end
Upload File
Create Folder