<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blogging and scraping &#187; multiple ruby files</title>
	<atom:link href="http://www.tsnpc.com/tag/multiple-ruby-files/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tsnpc.com</link>
	<description></description>
	<lastBuildDate>Tue, 13 Jul 2010 10:27:21 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.2</generator>
		<item>
		<title>Multiple ruby files work together</title>
		<link>http://www.tsnpc.com/multiple-ruby-files-work-together/</link>
		<comments>http://www.tsnpc.com/multiple-ruby-files-work-together/#comments</comments>
		<pubDate>Thu, 29 Oct 2009 04:06:05 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[multiple ruby files]]></category>

		<guid isPermaLink="false">http://www.tsnpc.com/?p=196</guid>
		<description><![CDATA[When writing the first few Ruby programs, there is a tend to place all the code in a single file. But as time passes by and the Ruby programs grow, it is nature that at some point we have to break our code up into logical groupings and place each group in a separate file [...]]]></description>
			<content:encoded><![CDATA[<p>When writing the first few Ruby programs, there is a tend to place all the code in a single file. But as time passes by and the Ruby programs grow, it is nature that at some point we have to break our code up into logical groupings and place each group in a separate file or files. </p>
<p>following is an examle:</p>
<p>in foo.rb:<br />
puts &#8220;it is foo&#8221;<br />
$foo = 3  # $ for global variable</p>
<p>in bar.rb:<br />
puts &#8220;it is bar&#8221;<br />
$bar = 3  # $ for global variable</p>
<p>in test.rb:<br />
require &#8216;foo&#8217; # pay attention &#8211;no &#8220;.rb&#8221;<br />
load &#8216;bar.rb&#8217; # pay attention &#8212; &#8220;.rb&#8221; is there<br />
test = 1 + $foo + $bar</p>
<p>when execute test.rb, it shows :<br />
it is foo<br />
it is bar<br />
9</p>
]]></content:encoded>
			<wfw:commentRss>http://www.tsnpc.com/multiple-ruby-files-work-together/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

