<?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>sparkymat &#187; ruby</title>
	<atom:link href="http://blog.sparkymat.net/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sparkymat.net</link>
	<description></description>
	<lastBuildDate>Mon, 26 Jul 2010 04:11:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Programming Blog</title>
		<link>http://blog.sparkymat.net/2008/11/18/programming-blog/</link>
		<comments>http://blog.sparkymat.net/2008/11/18/programming-blog/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 07:00:53 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.sparkymat.net/?p=200</guid>
		<description><![CDATA[I have started a programming blog here.]]></description>
			<content:encoded><![CDATA[<p>I have started a programming blog <a title="The Sparky Labs" href="http://labs.sparkymat.net/">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sparkymat.net/2008/11/18/programming-blog/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby 1.9 on Openmoko!!</title>
		<link>http://blog.sparkymat.net/2008/08/10/ruby-19-on-openmoko/</link>
		<comments>http://blog.sparkymat.net/2008/08/10/ruby-19-on-openmoko/#comments</comments>
		<pubDate>Sun, 10 Aug 2008 11:21:40 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[openmoko]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.sparkymat.net/?p=217</guid>
		<description><![CDATA[Managed to compile and package Ruby 1.9.0-3 for Openmoko!!! Download: ruby19-complete_190-3_armv4t [Update] Here&#8217;s the ruby package without dev and documentation (this would be smaller and more appropriate on the phone) &#8211; ruby19_190-3_armv4t]]></description>
			<content:encoded><![CDATA[<p>Managed to compile and package Ruby 1.9.0-3 for Openmoko!!!</p>
<p>Download: <a href="http://blog.sparkymat.net/wp-content/uploads/2008/08/ruby19-complete_190-3_armv4t.ipk">ruby19-complete_190-3_armv4t</a></p>
<p>[Update]</p>
<p>Here&#8217;s the ruby package without dev and documentation (this would be smaller and more appropriate on the phone) &#8211; <a href="http://blog.sparkymat.net/wp-content/uploads/2008/08/ruby19_190-3_armv4t.ipk">ruby19_190-3_armv4t</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sparkymat.net/2008/08/10/ruby-19-on-openmoko/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Rubygame 3 on Ruby 1.9</title>
		<link>http://blog.sparkymat.net/2008/04/02/rubygame-3-on-ruby-19/</link>
		<comments>http://blog.sparkymat.net/2008/04/02/rubygame-3-on-ruby-19/#comments</comments>
		<pubDate>Wed, 02 Apr 2008 13:53:34 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubygame]]></category>

		<guid isPermaLink="false">http://blog.sparkymat.net/2008/04/02/rubygame-3-on-ruby-19/</guid>
		<description><![CDATA[Creating a Ruby 1.9 sandbox 1. mkdir /home/user/ruby19 (example folder) 2. cd /home/user/ruby19 3. mkdir src 4. cd src 5. wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-1.tar.bz2 6. tar -jxvf ruby-1.9.0-1.tar.bz2 7. cd ruby-1.9.0-1 8. ./configure &#8211;prefix=/home/user/ruby19 9. make 10. make install Now you can switch to this sandbox at any time by executing &#8216;export PATH=/home/user/ruby19/bin:$PATH&#8217; in a shell. Chipmunk [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Creating a Ruby 1.9 sandbox</strong></p>
<p>1. mkdir /home/user/ruby19 (example folder)<br />
2. cd /home/user/ruby19<br />
3. mkdir src<br />
4. cd src<br />
5. wget http://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.0-1.tar.bz2<br />
6. tar -jxvf ruby-1.9.0-1.tar.bz2<br />
7. cd ruby-1.9.0-1<br />
8. ./configure &#8211;prefix=/home/user/ruby19<br />
9. make<br />
10. make install</p>
<p>Now you can switch to this sandbox at any time by executing &#8216;export PATH=/home/user/ruby19/bin:$PATH&#8217; in a shell.</p>
<p><strong>Chipmunk Installation</strong></p>
<p>Chipmunk is required for Rubygame 3</p>
<p>1. wget http://files.slembcke.net/chipmunk/release/ChipmunkLatest.tgz<br />
2. tar -zxvf ChipmunkLatest.tgz<br />
3. cd Chipmunk-4.0.2<br />
4. cd ruby<br />
5. export PATH=/home/user/ruby19/bin:$PATH (* switching to Ruby 1.9 sandbox)<br />
6. ruby extconf.rb<br />
7. make<br />
8. make install</p>
<p><strong>Rubygame 3 Installation</strong></p>
<p>1. mkdir /home/user/rubygame (example path)<br />
2. cd /home/user/rubygame<br />
3. svn co https://rubygame.svn.sourceforge.net/svnroot/rubygame/trunk rubygame3<br />
4. cd rubygame3/<br />
5. export PATH=/home/user/ruby19/bin:$PATH (* switching to Ruby 1.9 sandbox)<br />
6. cat Rakefile | sed s/PLATFORM/RUBY_PLATFORM/ > Rakefile.new;mv Rakefile.new Rakefile (* this replaces PLATFORM with RUBY_PLATFORM in the Rakefile)<br />
7. CFLAGS=&#8221;-I/home/user/ruby19/include/ruby-1.9.0 -I/home/user/ruby19/include/ruby-1.9.0/i686-linux&#8221; rake install<br />
8. cd ~/rubygame/rubygame3/samples/<br />
9. ruby chimp.rb<br />
10. Punch the monkey!! <img src='http://blog.sparkymat.net/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sparkymat.net/2008/04/02/rubygame-3-on-ruby-19/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Building an &#8220;include&#8221; graph</title>
		<link>http://blog.sparkymat.net/2006/08/06/building-an-include-graph/</link>
		<comments>http://blog.sparkymat.net/2006/08/06/building-an-include-graph/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 03:08:38 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.sparkymat.net/2006/08/06/building-an-include-graph/</guid>
		<description><![CDATA[How easy would it be to build include graphs in ruby? Here's my first attempt: PLAIN TEXT RUBY: $list_of_files = Hash.new $list_of_files.each &#123;&#124;node&#124; node = Array.new &#125; def store_includes&#40;pathname&#41; lines = IO.readlines&#40;pathname&#41; lines.each &#123;&#124;line&#124; if line.include? "#include" include_file = line&#91;line.index&#40;"#include"&#41;+"#include".size,line.size&#93; fidx = 0 sidx = 0 &#160; if include_file.include?&#40;"\""&#41; fidx = include_file.index&#40;"\""&#41; + 1 sidx [...]]]></description>
			<content:encoded><![CDATA[<p>How easy would it be to build include graphs in ruby?</p>
<p>Here's my first attempt:</p>
<div class="igBar"><span id="lruby-2"><a href="#" onclick="javascript:showPlainTxt('ruby-2'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-2">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$list_of_files = Hash.<span style="color:#9900CC;">new</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$list_of_files.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|node|</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">node = <span style="color:#CC0066; font-weight:bold;">Array</span>.<span style="color:#9900CC;">new</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> store_includes<span style="color:#006600; font-weight:bold;">&#40;</span>pathname<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lines = IO.<span style="color:#CC0066; font-weight:bold;">readlines</span><span style="color:#006600; font-weight:bold;">&#40;</span>pathname<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">lines.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span>|line|</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> line.<span style="color:#9966CC; font-weight:bold;">include</span>? <span style="color:#996600;">"#include"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">include_file = line<span style="color:#006600; font-weight:bold;">&#91;</span>line.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"#include"</span><span style="color:#006600; font-weight:bold;">&#41;</span>+<span style="color:#996600;">"#include"</span>.<span style="color:#9900CC;">size</span>,line.<span style="color:#9900CC;">size</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fidx = <span style="color:#006666;color:#800000;">0</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sidx = <span style="color:#006666;color:#800000;">0</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> include_file.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"<span style="color:#000099;">\"</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fidx = include_file.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"<span style="color:#000099;">\"</span>"</span><span style="color:#006600; font-weight:bold;">&#41;</span> + <span style="color:#006666;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sidx = include_file.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">"<span style="color:#000099;">\"</span>"</span>,fidx+<span style="color:#006666;color:#800000;">1</span><span style="color:#006600; font-weight:bold;">&#41;</span> - <span style="color:#006666;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> include_file.<span style="color:#9966CC; font-weight:bold;">include</span>?<span style="color:#006600; font-weight:bold;">&#40;</span>'&lt;'<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">fidx = include_file.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span>'&lt;'<span style="color:#006600; font-weight:bold;">&#41;</span> + <span style="color:#006666;color:#800000;">1</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">sidx = include_file.<span style="color:#9900CC;">index</span><span style="color:#006600; font-weight:bold;">&#40;</span>'&gt;'<span style="color:#006600; font-weight:bold;">&#41;</span> - <span style="color:#006666;color:#800000;">1</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">include_file = include_file<span style="color:#006600; font-weight:bold;">&#91;</span>fidx..<span style="color:#9900CC;">sidx</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">$list_of_files<span style="color:#006600; font-weight:bold;">&#91;</span>pathname<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">add</span><span style="color:#006600; font-weight:bold;">&#40;</span>include_file<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">&nbsp;</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">def</span> iterate_files<span style="color:#006600; font-weight:bold;">&#40;</span>pathname<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">list = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span> <span style="color:#008000; font-style:italic;">#alternate way of initializing an array</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> pathname==<span style="color:#996600;">"."</span> <span style="color:#9966CC; font-weight:bold;">or</span> pathname==<span style="color:#0000FF; font-weight:bold;">nil</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">list = Dir<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">"*"</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">else</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">list = Dir<span style="color:#006600; font-weight:bold;">&#91;</span>pathname + File::SEPERATOR + <span style="color:#996600;">"*"</span><span style="color:#006600; font-weight:bold;">&#93;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">list.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> |path|</div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> File.<span style="color:#9900CC;">filetype</span><span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#996600;">"directory"</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">iterate_files<span style="color:#006600; font-weight:bold;">&#40;</span>pathname<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">if</span> File.<span style="color:#9900CC;">filetype</span><span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span> == <span style="color:#996600;">"file"</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">store_includes<span style="color:#006600; font-weight:bold;">&#40;</span>path<span style="color:#006600; font-weight:bold;">&#41;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span></div>
</li>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#006600; font-weight:bold;">&#125;</span></div>
</li>
<li style="font-weight: bold;color:#26536A;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;"><span style="color:#9966CC; font-weight:bold;">end</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
<p>Any comments?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sparkymat.net/2006/08/06/building-an-include-graph/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>File extensions in ruby</title>
		<link>http://blog.sparkymat.net/2006/08/06/file-extensions-in-ruby/</link>
		<comments>http://blog.sparkymat.net/2006/08/06/file-extensions-in-ruby/#comments</comments>
		<pubDate>Sun, 06 Aug 2006 07:06:47 +0000</pubDate>
		<dc:creator>max</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://blog.sparkymat.net/2006/08/06/file-extensions-in-ruby/</guid>
		<description><![CDATA[Is there a more efficient way to extract the file extensions in ruby? I currently do the following. PLAIN TEXT RUBY: ext = File.basename&#40;filepath&#41;.reverse.split&#40;'.'&#41;&#91;0&#93;.reverse]]></description>
			<content:encoded><![CDATA[<p>Is there a more efficient way to extract the file extensions in ruby? I currently do the following.</p>
<div class="igBar"><span id="lruby-4"><a href="#" onclick="javascript:showPlainTxt('ruby-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">RUBY:</span>
<div id="ruby-4">
<div class="ruby">
<ol>
<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal;">ext = File.<span style="color:#9900CC;">basename</span><span style="color:#006600; font-weight:bold;">&#40;</span>filepath<span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">reverse</span>.<span style="color:#CC0066; font-weight:bold;">split</span><span style="color:#006600; font-weight:bold;">&#40;</span>'.'<span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;color:#800000;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">reverse</span> </div>
</li>
</ol>
</div>
</div>
</div>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.sparkymat.net/2006/08/06/file-extensions-in-ruby/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
