<?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>Ruy Rocha &#187; irb</title>
	<atom:link href="http://ruyrocha.com/tag/irb/feed/" rel="self" type="application/rss+xml" />
	<link>http://ruyrocha.com</link>
	<description>it&#039;s a long way to the top if wanna rock and roll</description>
	<lastBuildDate>Tue, 31 Jan 2012 02:17:28 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>IRB &#8211; Interactive Ruby Shell</title>
		<link>http://ruyrocha.com/irb-interactive-ruby-shell/</link>
		<comments>http://ruyrocha.com/irb-interactive-ruby-shell/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 20:57:25 +0000</pubDate>
		<dc:creator>Ruy Rocha</dc:creator>
				<category><![CDATA[Ruby]]></category>
		<category><![CDATA[interactive ruby shell]]></category>
		<category><![CDATA[irb]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://ruyrocha.com/?p=67</guid>
		<description><![CDATA[Passar batido sem falar do irb ficaria um tanto complicado. Você vê tuas linhas ganharem vida no irb quando executa o código na unha. O irb pode lêr sua configuração de um ~/.irbrc da vida. O que uso: require 'irb/completion' require 'irb/ext/save-history' &#160; IRB.conf&#91;:SAVE_HISTORY&#93; = 1000 IRB.conf&#91;:HISTORY_FILE&#93; = &#34;#{ENV['HOME']}/.irb-save-history&#34; puts &#34;History configured.&#34; &#160; # auto-indent [...]]]></description>
			<content:encoded><![CDATA[<p>Passar batido sem falar do irb ficaria um tanto complicado. Você vê tuas linhas ganharem vida no <strong>irb</strong> quando executa o código na unha.</p>
<p>O irb pode lêr sua configuração de um ~/.irbrc da vida. O que uso:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'irb/completion'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'irb/ext/save-history'</span>
&nbsp;
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:SAVE_HISTORY</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#006666;">1000</span>
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:HISTORY_FILE</span><span style="color:#006600; font-weight:bold;">&#93;</span> = <span style="color:#996600;">&quot;#{ENV['HOME']}/.irb-save-history&quot;</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;History configured.&quot;</span>
&nbsp;
<span style="color:#008000; font-style:italic;"># auto-indent</span>
IRB.<span style="color:#9900CC;">conf</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#ff3333; font-weight:bold;">:AUTO_INDENT</span><span style="color:#006600; font-weight:bold;">&#93;</span>=<span style="color:#0000FF; font-weight:bold;">true</span>
<span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Auto-indent on.&quot;</span>
&nbsp;
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'map_by_method'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'what_methods'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'pp'</span>
<span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'wirble'</span>
&nbsp;
THEME_FOR_WHITE_BKG = <span style="color:#006600; font-weight:bold;">&#123;</span>
      <span style="color:#008000; font-style:italic;"># delimiter colors</span>
      <span style="color:#ff3333; font-weight:bold;">:comma</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:purple</span>,
      <span style="color:#ff3333; font-weight:bold;">:refers</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># container colors (hash and array)</span>
      <span style="color:#ff3333; font-weight:bold;">:open_hash</span>          =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_hash</span>         =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:open_array</span>         =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_array</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># object colors</span>
      <span style="color:#ff3333; font-weight:bold;">:open_object</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_class</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:purple</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_addr_prefix</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      <span style="color:#ff3333; font-weight:bold;">:object_line_prefix</span> =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_object</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#008000; font-style:italic;"># symbol colors</span>
      <span style="color:#ff3333; font-weight:bold;">:symbol</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:black</span>,
      <span style="color:#ff3333; font-weight:bold;">:symbol_prefix</span>      =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:light_gray</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># string colors</span>
      <span style="color:#ff3333; font-weight:bold;">:open_string</span>        =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
      :<span style="color:#CC0066; font-weight:bold;">string</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:dark_gray</span>,
      <span style="color:#ff3333; font-weight:bold;">:close_string</span>       =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
&nbsp;
      <span style="color:#008000; font-style:italic;"># misc colors</span>
      <span style="color:#ff3333; font-weight:bold;">:number</span>             =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:black</span>,
      <span style="color:#ff3333; font-weight:bold;">:keyword</span>            =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:brown</span>,
      :<span style="color:#9966CC; font-weight:bold;">class</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:red</span>,
      <span style="color:#ff3333; font-weight:bold;">:range</span>              =<span style="color:#006600; font-weight:bold;">&amp;</span>gt; <span style="color:#ff3333; font-weight:bold;">:blue</span>,
    <span style="color:#006600; font-weight:bold;">&#125;</span>
&nbsp;
<span style="color:#008000; font-style:italic;">#Wirble::Colorize.colors = THEME_FOR_WHITE_BKG</span>
Wirble.<span style="color:#9900CC;">init</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:skip_prompt</span>=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;true,:skip_history=<span style="color:#006600; font-weight:bold;">&amp;</span>gt;true<span style="color:#006600; font-weight:bold;">&#41;</span>
Wirble.<span style="color:#9900CC;">colorize</span></pre></div></div>

<div class="tweetthis" style="text-align:left;"><p> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=IRB+%E2%80%93+Interactive+Ruby+Shell+http%3A%2F%2Fis.gd%2FBYYN2h" title="Post to Twitter"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/twitter/tt-twitter.png" alt="tt twitter IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://twitter.com/intent/tweet?text=IRB+%E2%80%93+Interactive+Ruby+Shell+http%3A%2F%2Fis.gd%2FBYYN2h" title="Post to Twitter">Tweet This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Delicious"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/delicious/tt-delicious.png" alt="tt delicious IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://delicious.com/post?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Delicious">Post to Delicious</a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Digg"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/digg/tt-digg.png" alt="tt digg IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://digg.com/submit?url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Digg">Digg This Post</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;t=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Facebook"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/facebook/tt-facebook.png" alt="tt facebook IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.facebook.com/share.php?u=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;t=IRB+%E2%80%93+Interactive+Ruby+Shell" title="Post to Facebook">Post to Facebook</a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell&amp;summary=Passar+batido+sem+falar+do+irb+ficaria+um+tanto+complicado.+Voc%C3%AA+v%C3%AA+tuas+linhas+ganharem+vida+no+irb+quando+executa+o+c%C3%B3digo+na+unha.%0D%0A%0D%0AO+irb+pode...&amp;source=Ruy Rocha" title="Post to LinkedIn"><img class="nothumb" src="http://ruyrocha.com/wp-content/plugins/tweet-this/icons/en/linkedin/tt-linkedin.png" alt="tt linkedin IRB   Interactive Ruby Shell"  title="IRB   Interactive Ruby Shell" /></a> <a target="_blank" rel="nofollow" class="tt" href="http://www.linkedin.com/shareArticle?mini=true&amp;url=http://ruyrocha.com/irb-interactive-ruby-shell/&amp;title=IRB+%E2%80%93+Interactive+Ruby+Shell&amp;summary=Passar+batido+sem+falar+do+irb+ficaria+um+tanto+complicado.+Voc%C3%AA+v%C3%AA+tuas+linhas+ganharem+vida+no+irb+quando+executa+o+c%C3%B3digo+na+unha.%0D%0A%0D%0AO+irb+pode...&amp;source=Ruy Rocha" title="Post to LinkedIn">Post to LinkedIn</a></p></div><div class="al2fb_like_button"><div id="fb-root"></div><script src="http://connect.facebook.net/pt_BR/all.js#appId=159773440769970&amp;xfbml=1" type="text/javascript"></script>
<fb:like href="http://ruyrocha.com/irb-interactive-ruby-shell/" send="true" layout="standard" show_faces="true" width="450" action="like" font="arial" colorscheme="light" ref="AL2FB"></fb:like></div>]]></content:encoded>
			<wfw:commentRss>http://ruyrocha.com/irb-interactive-ruby-shell/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

