$20 GRAYBYTE WORDPRESS FILE MANAGER $92

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/ruby18/lib64/ruby/1.8/rdoc/markup/sample/

HOME
Current File : /opt/alt/ruby18/lib64/ruby/1.8/rdoc/markup/sample//sample.rb
# This program illustrates the basic use of the SimpleMarkup
# class. It extracts the first comment block from the 
# simple_markup.rb file and converts it into HTML on
# standard output. Run it using
#
#  % ruby sample.rb
#
# You should be in the sample/ directory when you do this,
# as it hardwires the path to the files it needs to require.
# This isn't necessary in the code you write once you've 
# installed the package.
#
# For a better way of formatting code comment blocks (and more)
# see the rdoc package.
#

$:.unshift "../../.."

require 'rdoc/markup/simple_markup'
require 'rdoc/markup/simple_markup/to_html'

# Extract the comment block from the source file

input_string = ""

File.foreach("../simple_markup.rb") do |line|
  break unless line.gsub!(/^\# ?/, '')
  input_string << line
end

# Create a markup object
markup = SM::SimpleMarkup.new

# Attach it to an HTML formatter
h = SM::ToHtml.new

# And convert out comment block to html. Wrap it a body
# tag pair to let browsers view it

puts "<html><body>"
puts markup.convert(input_string, h)
puts "</body></html>"


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
rdoc2latex.rb
0.393 KB
12 Feb 2007 11.01 PM
root / linksafe
0644
sample.rb
1.062 KB
12 Feb 2007 11.01 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF