$20 GRAYBYTE WORDPRESS FILE MANAGER $71

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.23
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/alt/ruby19/lib64/ruby/1.9.1/rdoc/parser/

HOME
Current File : /opt/alt/ruby19/lib64/ruby/1.9.1/rdoc/parser//simple.rb
##
# Parse a non-source file. We basically take the whole thing as one big
# comment.

class RDoc::Parser::Simple < RDoc::Parser

  parse_files_matching(//)

  attr_reader :content # :nodoc:

  ##
  # Prepare to parse a plain file

  def initialize(top_level, file_name, content, options, stats)
    super

    preprocess = RDoc::Markup::PreProcess.new @file_name, @options.rdoc_include

    preprocess.handle @content, @top_level
  end

  ##
  # Extract the file contents and attach them to the TopLevel as a comment

  def scan
    comment = remove_coding_comment @content
    comment = remove_private_comments comment

    @top_level.comment = comment
    @top_level.parser = self.class
    @top_level
  end

  ##
  # Removes comments wrapped in <tt>--/++</tt>

  def remove_private_comments text
    text.gsub(/^--\n.*?^\+\+/m, '').sub(/^--\n.*/m, '')
  end

  ##
  # Removes the encoding magic comment from +text+

  def remove_coding_comment text
    text.sub(/\A# .*coding[=:].*$/, '')
  end

end



Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
3 Mar 2024 10.48 PM
root / linksafe
0755
c.rb
30.131 KB
5 Aug 2011 9.21 PM
root / linksafe
0644
ruby.rb
41.23 KB
5 Aug 2011 9.21 PM
root / linksafe
0644
ruby_tools.rb
2.925 KB
5 Aug 2011 9.21 PM
root / linksafe
0644
simple.rb
0.981 KB
20 Dec 2010 3.22 AM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF