<?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>Seven steps &#187; gem</title>
	<atom:link href="http://trevoke.net/blog/tag/gem/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevoke.net/blog</link>
	<description>Martial arts and technology, $DEITY what a mix!</description>
	<lastBuildDate>Wed, 01 Feb 2012 03:43:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>New gem: ListBrowser</title>
		<link>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/</link>
		<comments>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/#comments</comments>
		<pubDate>Sat, 16 Jan 2010 00:01:19 +0000</pubDate>
		<dc:creator>Trevoke</dc:creator>
				<category><![CDATA[ruby]]></category>
		<category><![CDATA[gem]]></category>
		<category><![CDATA[listbrowser]]></category>

		<guid isPermaLink="false">http://trevoke.net/blog/?p=209</guid>
		<description><![CDATA[~~~~ ListBrowser README ~~~~ I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. &#8220;What??&#8221;, I thought. &#8220;I have to use my brain?! God forbid!&#8221;. So I set to using my brain a little more to create this tool. <a href='http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>~~~~ ListBrowser README ~~~~</p>
<p>I was working on a parser for a very specific tree structure, and was frustrated that there wasn’t a simple way to parse it in irb. &#8220;What??&#8221;, I thought. &#8220;I have to use my brain?! God forbid!&#8221;. So I set to using my brain a little more to create this tool. It’s not much, but maybe it’ll make someone’s life a little easier.</p>
<p>Install: (set up gemcutter)<br />
gem install ListBrowser</p>
<p>It can be used in irb, and really should be used there &#8211; when you call it on a tree structure, you’ll get a menu with a list of choices on how you want to go through whatever structure you gave it.</p>
<p>In my particular, special case, I would do something like this:</p>
<p>require ‘sgf_parser’ # For my tree structure require ‘list_browser’ # For this.</p>
<p>tree = SgfParser::Tree.new :filename => &#8220;kogo.sgf&#8221;</p>
<p>ListBrowser.new tree.root, ‘parent’, ‘children’, ‘properties’</p>
<p># And follow the menu!</p>
<p> In my particular case, I would not need to enter those strings, as they<br />
 just happen to be the names I chose for my tree structure, but they should<br />
 serve as a good enough example!</p>
]]></content:encoded>
			<wfw:commentRss>http://trevoke.net/blog/2010/01/15/new-gem-listbrowser/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.281 seconds -->

