<?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>Curtis Summers &#187; ruby</title>
	<atom:link href="http://csummers.com/category/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://csummers.com</link>
	<description>%w{life code ruby}.map { &#124;i&#124; "#{i} is awesome" }</description>
	<lastBuildDate>Tue, 16 Mar 2010 11:33:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>warning: default `to_a&#8217; will be obsolete</title>
		<link>http://csummers.com/2008/07/26/warning-default-to_a-will-be-obsolete/</link>
		<comments>http://csummers.com/2008/07/26/warning-default-to_a-will-be-obsolete/#comments</comments>
		<pubDate>Sat, 26 Jul 2008 21:30:15 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://csummers.com/?p=9</guid>
		<description><![CDATA[Apparently Object.to_a will eventually be obsolete (not sure when).  I was using it in the following context: def foo&#40;args&#41; args.to_a.join&#40;','&#41; end According to this very old ruby-lang thread, this [*args] is a suitable alternative: def foo&#40;args&#41; &#91;*args&#93;.join&#40;','&#41; end]]></description>
			<content:encoded><![CDATA[<p>Apparently <a href="http://ruby-doc.org/core/classes/Object.html#M000628">Object.to_a</a> will eventually be obsolete (not sure when).  I was using it in the following context:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">def</span> foo<span style="color:#006600; font-weight:bold;">&#40;</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
  args.<span style="color:#9900CC;">to_a</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">','</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>According to <a href="http://groups.google.com/group/comp.lang.ruby/browse_thread/thread/931de58e7189d355">this very old ruby-lang thread</a>, this [*args] is a suitable alternative:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">def</span> foo<span style="color:#006600; font-weight:bold;">&#40;</span>args<span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">*</span>args<span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">join</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">','</span><span style="color:#006600; font-weight:bold;">&#41;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2008/07/26/warning-default-to_a-will-be-obsolete/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ActiveYahoo: A Ruby API for Yahoo! Web Services</title>
		<link>http://csummers.com/2007/11/04/activeyahoo-a-ruby-api-for-yahoo-web-services/</link>
		<comments>http://csummers.com/2007/11/04/activeyahoo-a-ruby-api-for-yahoo-web-services/#comments</comments>
		<pubDate>Mon, 05 Nov 2007 02:31:08 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[activeyahoo]]></category>

		<guid isPermaLink="false">http://csummers.com/?p=5</guid>
		<description><![CDATA[Do you Yahoo? I do, and was recently a little disappointed in the Ruby offerings for the Yahoo Web Services API. So, a little coding and we have ActiveYahoo: require 'active_yahoo' y = ActiveYahoo::WebSearch.new&#40;‘YOUR_APP_ID’, ‘ruby’, &#123; :results =&#62; 2 &#125;&#41; y.result.total_results_returned # =&#62; 2 y.result.records&#91;0&#93;.title # =&#62; &#34;Ruby-lang.org&#34; y.result.records.map &#123; &#124;r&#124; r.url &#125; # =&#62; [...]]]></description>
			<content:encoded><![CDATA[<p>Do you Yahoo?  I do, and was recently a little disappointed in the Ruby offerings for the Yahoo Web Services API.  So, a little coding and we have ActiveYahoo:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'active_yahoo'</span>
y = <span style="color:#6666ff; font-weight:bold;">ActiveYahoo::WebSearch</span>.<span style="color:#9900CC;">new</span><span style="color:#006600; font-weight:bold;">&#40;</span>‘YOUR_APP_ID’, ‘ruby’, <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#ff3333; font-weight:bold;">:results</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
y.<span style="color:#9900CC;">result</span>.<span style="color:#9900CC;">total_results_returned</span>  <span style="color:#008000; font-style:italic;"># =&gt; 2</span>
y.<span style="color:#9900CC;">result</span>.<span style="color:#9900CC;">records</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#93;</span>.<span style="color:#9900CC;">title</span>  <span style="color:#008000; font-style:italic;"># =&gt; &quot;Ruby-lang.org&quot;</span>
y.<span style="color:#9900CC;">result</span>.<span style="color:#9900CC;">records</span>.<span style="color:#9900CC;">map</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>r<span style="color:#006600; font-weight:bold;">|</span> r.<span style="color:#9900CC;">url</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
<span style="color:#008000; font-style:italic;">#  =&gt; [&quot;http://www.ruby-lang.org/en&quot;,</span>
<span style="color:#008000; font-style:italic;">#      &quot;http://en.wikipedia.org/wiki/Ruby_programming_language&quot;]</span></pre></div></div>

<p>A primary objective of ActiveYahoo is to encapsulate Yahoo‘s responses into their own objects. For example, an instance of the WebSearch class will return a WebSearchResult object. Special care is also given to convert response fields into appropriate Ruby data types.</p>
<p>So far, the following Search services have been implemented:  Web, News, Images, Audio, and Video.  More will follow soon. The essentials are on Rubyforge here:</p>
<p><a href="http://rubyforge.org/projects/activeyahoo/">View the ActiveYahoo project page</a><br />
<a href="http://activeyahoo.rubyforge.org/">View the documentation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2007/11/04/activeyahoo-a-ruby-api-for-yahoo-web-services/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby: Recursive send</title>
		<link>http://csummers.com/2007/01/18/ruby-recursive-send/</link>
		<comments>http://csummers.com/2007/01/18/ruby-recursive-send/#comments</comments>
		<pubDate>Thu, 18 Jan 2007 20:02:25 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://www.csummers.org/index.php/2007/01/18/ruby-recursive-send/</guid>
		<description><![CDATA[Ruby&#8217;s Object#send allows dynamic calling of a method. This is very useful, but what if we wanted to call several levels deep on an object? For instance: # Normal call chain post.comments.first.commented_at &#160; # Dynamically with send? Have to call three times. post.send&#40;:comments&#41;.send&#40;:first&#41;.send&#40;:commented_at&#41; What if the number of calls to send is variable depending on [...]]]></description>
			<content:encoded><![CDATA[<p>Ruby&#8217;s Object#send allows dynamic calling of a method.  This is very useful, but what if we wanted to call several levels deep on an object?  For instance:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;"># Normal call chain</span>
post.<span style="color:#9900CC;">comments</span>.<span style="color:#9900CC;">first</span>.<span style="color:#9900CC;">commented_at</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Dynamically with send?  Have to call three times.</span>
post.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:comments</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:first</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">send</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:commented_at</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>What if the number of calls to send is variable depending on what we&#8217;re trying to show?  In one case we might need <span style="font-family: mono">post.posted_at</span> for the date, and in another case we might need <span style="font-family: mono">post.comments.first.commented_at</span> for the date.</p>
<p>How could we dynamically craft the definition of the methods to send if we don&#8217;t know how many calls to Object#send we&#8217;ll have?  We need a way to define an arbitrary number of method calls.</p>
<p>Behold, a recursive send:  Object#rsend</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC00FF; font-weight:bold;">Object</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> rsend<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>args, <span style="color:#006600; font-weight:bold;">&amp;</span>block<span style="color:#006600; font-weight:bold;">&#41;</span>
    obj = <span style="color:#0000FF; font-weight:bold;">self</span>
    args.<span style="color:#9900CC;">each</span> <span style="color:#9966CC; font-weight:bold;">do</span> <span style="color:#006600; font-weight:bold;">|</span>a<span style="color:#006600; font-weight:bold;">|</span>
      b = <span style="color:#006600; font-weight:bold;">&#40;</span>a.<span style="color:#9900CC;">is_a</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">Array</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&amp;&amp;</span> a.<span style="color:#9900CC;">last</span>.<span style="color:#9900CC;">is_a</span>?<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">Proc</span><span style="color:#006600; font-weight:bold;">&#41;</span> ? a.<span style="color:#9900CC;">pop</span> : block<span style="color:#006600; font-weight:bold;">&#41;</span>
      obj = obj.__send__<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>a, <span style="color:#006600; font-weight:bold;">&amp;</span>b<span style="color:#006600; font-weight:bold;">&#41;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
    obj
  <span style="color:#9966CC; font-weight:bold;">end</span>
  alias_method <span style="color:#ff3333; font-weight:bold;">:__rsend__</span>, <span style="color:#ff3333; font-weight:bold;">:rsend</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Each argument passed to Object#rsend is an array with the symbols and arguments that will be passed on to Object#send:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">post.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:comments</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:first</span><span style="color:#006600; font-weight:bold;">&#93;</span>,<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:commented_at</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>If there are no arguments to be passed on to send, the array brackets can be omitted:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">post.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:comments</span>, <span style="color:#ff3333; font-weight:bold;">:first</span>, <span style="color:#ff3333; font-weight:bold;">:commented_at</span><span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>Of course, in practice you&#8217;ll probably be defining your method call chain in one part of your code, putting it in a variable, and sending it to rsend with a splat*:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">the_date = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:comments</span>, <span style="color:#ff3333; font-weight:bold;">:first</span>, <span style="color:#ff3333; font-weight:bold;">:commented_at</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#...somewhere else in your code you've passed the_date along:</span>
post.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">*</span>the_date<span style="color:#006600; font-weight:bold;">&#41;</span></pre></div></div>

<p>With arguments:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">a = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006666;">0</span>,<span style="color:#006666;">1</span>,<span style="color:#006666;">2</span>,<span style="color:#006666;">3</span>,<span style="color:#006666;">4</span>,<span style="color:#006666;">5</span>,<span style="color:#006666;">6</span>,<span style="color:#006666;">7</span>,<span style="color:#006666;">8</span>,<span style="color:#006666;">9</span><span style="color:#006600; font-weight:bold;">&#93;</span>
&nbsp;
a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:slice</span>, <span style="color:#006666;">2</span>, <span style="color:#006666;">8</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#=&gt; [2, 3, 4, 5, 6, 7, 8, 9]</span>
&nbsp;
a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:slice</span>, <span style="color:#006666;">2</span>, <span style="color:#006666;">8</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:slice</span>, <span style="color:#006666;">1</span>, <span style="color:#006666;">3</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;">#=&gt; [3, 4, 5]</span></pre></div></div>

<p>Object#send accepts a block.  What about blocks?  Pass in a proc:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:map</span>, <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">proc</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;">#=&gt; [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]</span>
&nbsp;
a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:map</span>, <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">proc</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span>,
        <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:select</span>, <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">proc</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x <span style="color:#006600; font-weight:bold;">%</span> <span style="color:#006666;">4</span> == <span style="color:#006666;">0</span><span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#008000; font-style:italic;">#=&gt; [0, 4, 8, 12, 16]</span></pre></div></div>

<p>And, in an effort to make Object#rsend behave like Object#send for the simple case, you can send a regular block:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:map</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#008000; font-style:italic;">#=&gt; [0, 2, 4, 6, 8, 10, 12, 14, 16, 18]</span></pre></div></div>

<p>Caveat:  For the case needing parameters, Object#rsend does require an array, so:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:slice</span>, <span style="color:#006666;">2</span>, <span style="color:#006666;">8</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;"># wrong, does not work like Object#send</span>
&nbsp;
a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:slice</span>, <span style="color:#006666;">2</span>, <span style="color:#006666;">8</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#008000; font-style:italic;"># right</span></pre></div></div>

<p>A quirk that I&#8217;ve left in for fun, but it might (and maybe should) change:  If providing a single block, that block will be called on every call unless you&#8217;ve already passed in a proc:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby">a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:map</span>, <span style="color:#ff3333; font-weight:bold;">:map</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#008000; font-style:italic;">#=&gt; [0, 4, 8, 12, 16, 20, 24, 28, 32, 36]</span>
&nbsp;
a.<span style="color:#9900CC;">rsend</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:map</span>, <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:map</span>, <span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#CC0066; font-weight:bold;">proc</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006666;">+5</span> <span style="color:#006600; font-weight:bold;">&#125;</span><span style="color:#006600; font-weight:bold;">&#41;</span><span style="color:#006600; font-weight:bold;">&#93;</span>, <span style="color:#ff3333; font-weight:bold;">:map</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>x<span style="color:#006600; font-weight:bold;">|</span> x<span style="color:#006600; font-weight:bold;">*</span><span style="color:#006666;">2</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
  <span style="color:#008000; font-style:italic;">#=&gt; [10, 14, 18, 22, 26, 30, 34, 38, 42, 46]</span>
  <span style="color:#008000; font-style:italic;">#outer block was called on first and third :map</span></pre></div></div>

<p>Can anyone come up with a good use for this call-the-block-each-time behavior?</p>
<p>Has anyone done this already?  I searched for such a thing and came up empty.  Maybe this method should be called something else?  I named it based on each call recursing down the chain of methods with a new object being returned for the next method to be sent to.</p>
<p>Suggestions and comments are welcome.</p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2007/01/18/ruby-recursive-send/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Extend String to use ActionView&#8217;s Text Helpers</title>
		<link>http://csummers.com/2006/08/07/extend-string-to-use-actionviews-text-helpers/</link>
		<comments>http://csummers.com/2006/08/07/extend-string-to-use-actionviews-text-helpers/#comments</comments>
		<pubDate>Mon, 07 Aug 2006 21:54:02 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[rubyonrails]]></category>

		<guid isPermaLink="false">http://www.csummers.org/index.php/2006/08/07/extend-string-to-use-actionviews-text-helpers/</guid>
		<description><![CDATA[Ruby on Rails and Ruby are an amazing combo. Here&#8217;s another example of why. ActionView&#8217;s TextHelper methods are useful, but I often need to use them in my controller or my model. For several of the TextHelper methods that expect a string as input, it makes sense to extend the String class. So, if I [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.rubyonrails.com/">Ruby on Rails</a> and <a href="http://www.ruby-lang.org/en/">Ruby</a> are an amazing combo.  Here&#8217;s another example of why.</p>
<p>ActionView&#8217;s TextHelper methods are useful, but I often need to use them in my controller or my model.  For several of the TextHelper methods that expect a string as input, it makes sense to extend the String class.</p>
<p>So, if I want to strip HTML tags, auto link any URLs, and then simple format a comment (in that order) before I save it in the database I can do:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#9966CC; font-weight:bold;">class</span> Comment <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">ActiveRecord::Base</span>
<span style="color:#008000; font-style:italic;">#...</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> before_save
    <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">text</span> = <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">text</span>.<span style="color:#9900CC;">strip_tags</span>.<span style="color:#9900CC;">auto_link</span>.<span style="color:#9900CC;">simple_format</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This method is much cleaner than including ActionView::Helpers::TextHelper in whatever class I&#8217;m in and passing the string as an argument to each method.</p>
<p>Below is the magic code.  Since TextHelper is a module, we create a Singleton class to reference the methods, create the wrapper methods in their own module, and finally include that module in the String class.  Note that not all TextHelper methods are included&#8211;just the ones that make sense.  Drop this code into a file and require it in your environment or within a plugin.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby"><span style="color:#008000; font-style:italic;"># ActionView Text Helpers are great!</span>
<span style="color:#008000; font-style:italic;"># Let's extend the String class to allow us to call</span>
<span style="color:#008000; font-style:italic;"># some of these methods directly on a String.</span>
<span style="color:#008000; font-style:italic;"># Note:</span>
<span style="color:#008000; font-style:italic;">#  - cycle-related methods are not included</span>
<span style="color:#008000; font-style:italic;">#  - concat is not included</span>
<span style="color:#008000; font-style:italic;">#  - pluralize is not included because it is in</span>
<span style="color:#008000; font-style:italic;">#       ActiveSupport String extensions already</span>
<span style="color:#008000; font-style:italic;">#       (though they differ).</span>
<span style="color:#008000; font-style:italic;">#  - markdown requires BlueCloth</span>
<span style="color:#008000; font-style:italic;">#  - textilize methods require RedCloth</span>
<span style="color:#008000; font-style:italic;"># Example:</span>
<span style="color:#008000; font-style:italic;"># &quot;&lt;b&gt;coolness&lt;/b&gt;&quot;.strip_tags -&gt; &quot;coolness&quot;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'singleton'</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Singleton to be called in wrapper module</span>
<span style="color:#9966CC; font-weight:bold;">class</span> TextHelperSingleton
  <span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#CC00FF; font-weight:bold;">Singleton</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">ActionView::Helpers::TextHelper</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">ActionView::Helpers::TagHelper</span> <span style="color:#008000; font-style:italic;">#tag_options needed by auto_link</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># Wrapper module</span>
<span style="color:#9966CC; font-weight:bold;">module</span> MyExtensions <span style="color:#008000; font-style:italic;">#:nodoc:</span>
  <span style="color:#9966CC; font-weight:bold;">module</span> CoreExtensions <span style="color:#008000; font-style:italic;">#:nodoc:</span>
    <span style="color:#9966CC; font-weight:bold;">module</span> <span style="color:#CC0066; font-weight:bold;">String</span> <span style="color:#008000; font-style:italic;">#:nodoc:</span>
      <span style="color:#9966CC; font-weight:bold;">module</span> TextHelper
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> auto_link<span style="color:#006600; font-weight:bold;">&#40;</span>link = <span style="color:#ff3333; font-weight:bold;">:all</span>, href_options = <span style="color:#006600; font-weight:bold;">&#123;</span><span style="color:#006600; font-weight:bold;">&#125;</span>, <span style="color:#006600; font-weight:bold;">&amp;</span>block<span style="color:#006600; font-weight:bold;">&#41;</span>
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">auto_link</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, link, href_options, <span style="color:#006600; font-weight:bold;">&amp;</span>block<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> excerpt<span style="color:#006600; font-weight:bold;">&#40;</span>phrase, radius = <span style="color:#006666;">100</span>, excerpt_string = <span style="color:#996600;">&quot;...&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">excerpt</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, phrase, radius, excerpt_string<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> highlight<span style="color:#006600; font-weight:bold;">&#40;</span>phrase, highlighter = <span style="color:#996600;">'&lt;strong class=&quot;highlight&quot;&gt;<span style="color:#000099;">\1</span>&lt;/strong&gt;'</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">highlight</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, phrase, highlighter<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">begin</span>
          require_library_or_gem <span style="color:#996600;">'bluecloth'</span>
&nbsp;
          <span style="color:#9966CC; font-weight:bold;">def</span> markdown
            TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">markdown</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">LoadError</span>
          <span style="color:#008000; font-style:italic;"># do nothing.  method will be undefined</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> sanitize
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">sanitize</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> simple_format
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">simple_format</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> strip_tags
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">strip_tags</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">begin</span>
          require_library_or_gem <span style="color:#996600;">'redcloth'</span>
&nbsp;
          <span style="color:#9966CC; font-weight:bold;">def</span> textilize
            TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">textilize</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
          <span style="color:#9966CC; font-weight:bold;">def</span> textilize_without_paragraph
            TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">textilize_without_paragraph</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          <span style="color:#9966CC; font-weight:bold;">end</span>
        <span style="color:#9966CC; font-weight:bold;">rescue</span> <span style="color:#CC00FF; font-weight:bold;">LoadError</span>
          <span style="color:#008000; font-style:italic;"># do nothing.  methods will be undefined</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> truncate<span style="color:#006600; font-weight:bold;">&#40;</span>length = <span style="color:#006666;">30</span>, truncate_string = <span style="color:#996600;">&quot;...&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">truncate</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, length, truncate_string<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
        <span style="color:#9966CC; font-weight:bold;">def</span> word_wrap<span style="color:#006600; font-weight:bold;">&#40;</span>line_width = <span style="color:#006666;">80</span><span style="color:#006600; font-weight:bold;">&#41;</span>
          TextHelperSingleton.<span style="color:#9900CC;">instance</span>.<span style="color:#9900CC;">word_wrap</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#0000FF; font-weight:bold;">self</span>, line_width<span style="color:#006600; font-weight:bold;">&#41;</span>
        <span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
      <span style="color:#9966CC; font-weight:bold;">end</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># extend String with the TextHelper functions</span>
<span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">String</span> <span style="color:#008000; font-style:italic;">#:nodoc:</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> <span style="color:#6666ff; font-weight:bold;">MyExtensions::CoreExtensions::<span style="color:#CC0066; font-weight:bold;">String</span>::TextHelper</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>This idea and code was somewhat inspired by <a href="http://gabriel.gironda.org/articles/2006/02/08/using-helpers-inside-a-controller">Gabriel&#8217;s post on using helpers inside a controller</a>.  Thanks Gabriel!</p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2006/08/07/extend-string-to-use-actionviews-text-helpers/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>The Ruby Feel</title>
		<link>http://csummers.com/2006/02/05/the-ruby-feel/</link>
		<comments>http://csummers.com/2006/02/05/the-ruby-feel/#comments</comments>
		<pubDate>Sun, 05 Feb 2006 11:28:16 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.csummers.org/index.php/2006/02/05/the-ruby-feel/</guid>
		<description><![CDATA[I&#8217;ve been using PHP about 8 years now for web development. I remember when I first discovered PHP. I had been writing CGI applications in C/C++ at the time, and PHP was a breath of fresh air. It was so powerful, yet so simple. I can&#8217;t describe it exactly, but there was a good feeling [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been using <a href="http://www.php.net/">PHP</a> about 8 years now for web development.  I remember when I first discovered PHP.  I had been writing CGI applications in C/C++ at the time, and PHP was a breath of fresh air.  It was so powerful, yet so simple.  I can&#8217;t describe it exactly, but there was a good <em>feeling</em> about PHP.</p>
<p>Fast forward to present day where I&#8217;ve been learning and using <a href="http://ruby-lang.org/en/">Ruby</a>, and the <em>feeling</em> is very similar.  For me, Ruby is the next breath of fresh air in programming languages.  It just <em>feels</em> right.</p>
<p>Obviously, other programmers have different opinions, and that&#8217;s okay with me.  I&#8217;m not here to win your heart for Ruby.  Other languages may create the right <em>feel</em> for you.  If <a href="http://www.python.org">python</a> makes you happy, then I say &#8220;Congratulations, on finding a language that you love!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2006/02/05/the-ruby-feel/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ruby Code &amp; Style</title>
		<link>http://csummers.com/2005/10/10/ruby-code-style/</link>
		<comments>http://csummers.com/2005/10/10/ruby-code-style/#comments</comments>
		<pubDate>Mon, 10 Oct 2005 10:56:08 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.csummers.org/index.php/2005/10/10/ruby-code-style/</guid>
		<description><![CDATA[Well, it&#8217;s been almost a month now since the baby came. We&#8217;re doing well, but very tired. Adding to my things-to-read-when-I&#8217;m-not-so-tired list: Ruby Code &#038; Style &#8211; a new online magazine from Artima about the Ruby language.]]></description>
			<content:encoded><![CDATA[<p>Well, it&#8217;s been almost a month now since the baby came.  We&#8217;re doing well, but very tired.  Adding to my things-to-read-when-I&#8217;m-not-so-tired list:</p>
<p><a href="http://www.artima.com/rubycs/index.html">Ruby Code &#038; Style</a> &#8211; a new online magazine from <a href="http://www.artima.com/">Artima</a> about the Ruby language.</p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2005/10/10/ruby-code-style/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PL/Ruby and PL/PHP in PostgreSQL</title>
		<link>http://csummers.com/2005/08/23/plruby-and-plphp-in-postgresql/</link>
		<comments>http://csummers.com/2005/08/23/plruby-and-plphp-in-postgresql/#comments</comments>
		<pubDate>Tue, 23 Aug 2005 16:08:44 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>
		<category><![CDATA[sql]]></category>

		<guid isPermaLink="false">http://www.csummers.org/?p=27</guid>
		<description><![CDATA[The ability to write procedural language (PL) in Ruby and PHP for PostgreSQL is awesome. I wish Oracle had something similar (and no, I&#8217;m not talking about Java). PL/Ruby PL/PHP]]></description>
			<content:encoded><![CDATA[<p>The ability to write procedural language (PL) in Ruby and PHP for PostgreSQL is awesome.  I wish Oracle had something similar (and no, I&#8217;m not talking about Java).</p>
<ul>
<li><a href="http://moulon.inra.fr/ruby/plruby.html">PL/Ruby</a></li>
<li><a href="http://www.commandprompt.com/community/plphp">PL/PHP</a></li>
</ul>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2005/08/23/plruby-and-plphp-in-postgresql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Programming Ruby</title>
		<link>http://csummers.com/2005/07/11/programming-ruby/</link>
		<comments>http://csummers.com/2005/07/11/programming-ruby/#comments</comments>
		<pubDate>Mon, 11 Jul 2005 22:50:56 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[reading]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.csummers.org/?p=22</guid>
		<description><![CDATA[I&#8217;m currently reading Programming Ruby (2nd edition) in my pursuit to learn Ruby. This book, known as the PickAxe because of the tool on the front cover, is part tutorial, part language reference, part best-Ruby-practices, and part API/Library reference. The tendency with a reference book like this is to lump everything about a particular topic [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m currently reading <a href="http://www.amazon.com/exec/obidos/redirect?link_code=ur2&amp;camp=1789&amp;tag=csummersorg-20&amp;creative=9325&amp;path=tg/detail/-/0974514055/qid=1121104373/sr=8-1/ref=pd_bbs_ur_1?v=glance%26s=books%26n=507846">Programming Ruby (2nd edition)</a><img src="http://www.assoc-amazon.com/e/ir?t=csummersorg-20&amp;l=ur2&amp;o=1" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" /> in my pursuit to learn Ruby.  This book, known as the PickAxe because of the tool on the front cover, is part tutorial, part language reference, part best-Ruby-practices, and part API/Library reference.</p>
<p>The tendency with a reference book like this is to lump everything about a particular topic into long, boring sections.  However, Dave Thomas and co-authors have managed not to do this.  The book is good at switching gears frequently enough to keep my focus.  Notes comparing Ruby to Perl, Java, and C++ add perspective if you are familiar with those languages.  The code samples in this book also set it apart from similar programming books: the examples are concise&#8211;giving just enough information to illustrate the point in question.</p>
<p>As I read through the book, I find myself thinking:  &#8220;Wow, it would&#8217;ve taken me so much more code to do that in Java (or C++ or &#8230;)!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2005/07/11/programming-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Ruby</title>
		<link>http://csummers.com/2005/06/23/learning-ruby/</link>
		<comments>http://csummers.com/2005/06/23/learning-ruby/#comments</comments>
		<pubDate>Thu, 23 Jun 2005 10:40:12 +0000</pubDate>
		<dc:creator>Curt</dc:creator>
				<category><![CDATA[programming]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.csummers.org/?p=17</guid>
		<description><![CDATA[I&#8217;ve been learning the Ruby language lately. This language started in Japan, but I think it&#8217;s catching on like wildfire over here now. It seems to have such a pure way about implementing its features. Some helpful Ruby references: Programming Ruby &#8211; online book Why&#8217;s (Poignant) Guide to Ruby &#8211; book with cartoon foxes! Things [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning the <a href="http://www.ruby-lang.org/en">Ruby</a> language lately.  This language started in Japan, but I think it&#8217;s catching on like wildfire over here now.  It seems to have such a pure way about implementing its features.</p>
<p>Some helpful Ruby references:</p>
<ul>
<li><a href="http://www.rubycentral.com/book/">Programming Ruby</a> &#8211; online book</li>
<li><a href="http://www.poignantguide.net/ruby/">Why&#8217;s (Poignant) Guide to Ruby</a> &#8211; book with cartoon foxes!</li>
<li><a href="http://www.glue.umd.edu/%7Ebilltj/ruby.html">Things That Newcomers to Ruby Should Know</a> &#8211; helpful tips</li>
<li><a href="http://ruby-gnome2.sourceforge.jp/">Ruby-GNOME2</a> &#8211; GNOME/GTK bindings for Ruby</li>
<li><a href="http://www.artima.com/articles/index.jsp?topic=ruby">Ruby Articles</a> &#8211; I suggest reading <a href="http://www.artima.com/intv/closures.html">Blocks and Closures</a> and <a href="http://www.artima.com/intv/tuesday.html">Dynamic Productivity</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://csummers.com/2005/06/23/learning-ruby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

