<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
	>
<channel>
	<title>Comments on: Convert your Hash keys to object properties in Ruby</title>
	<atom:link href="http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/</link>
	<description>Me code gooder one day (and more fastly)</description>
	<pubDate>Fri, 10 Sep 2010 09:59:23 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Kenan</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-237</link>
		<dc:creator>Kenan</dc:creator>
		<pubDate>Sat, 08 May 2010 05:32:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-237</guid>
		<description>Hey, thanks so much. I was not looking forward to figuring out how to do this (OpenStruct isn't recursive and wouldn't apply to nested stuff). But this did the trick for me. Thanks for saving me some time!</description>
		<content:encoded><![CDATA[<p>Hey, thanks so much. I was not looking forward to figuring out how to do this (OpenStruct isn&#8217;t recursive and wouldn&#8217;t apply to nested stuff). But this did the trick for me. Thanks for saving me some time!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kerry</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-236</link>
		<dc:creator>kerry</dc:creator>
		<pubDate>Wed, 05 May 2010 19:51:14 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-236</guid>
		<description>When dealing with json feeds (which is what I am using this for) OpenStruct is insufficient as there are nested hashes.  So you would have to call it for element.  ie.

Given:
my_hash = { :a =&gt; :b, :c =&gt; {:d =&gt; :e, :f =&gt; :g} }

using openstruct you would have to say openstruct.c[:d] to get :e

with my solution you can simply say:

my_hash.c.d</description>
		<content:encoded><![CDATA[<p>When dealing with json feeds (which is what I am using this for) OpenStruct is insufficient as there are nested hashes.  So you would have to call it for element.  ie.</p>
<p>Given:<br />
my_hash = { :a =&gt; :b, :c =&gt; {:d =&gt; :e, :f =&gt; :g} }</p>
<p>using openstruct you would have to say openstruct.c[:d] to get :e</p>
<p>with my solution you can simply say:</p>
<p>my_hash.c.d</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kerry</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-235</link>
		<dc:creator>kerry</dc:creator>
		<pubDate>Wed, 05 May 2010 19:27:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-235</guid>
		<description>Thanks for the tip!

I did not know of that class.  

Sometimes though, you may not have the ability to wrap an object to access the properties or you don't want to do it over and over again.</description>
		<content:encoded><![CDATA[<p>Thanks for the tip!</p>
<p>I did not know of that class.  </p>
<p>Sometimes though, you may not have the ability to wrap an object to access the properties or you don&#8217;t want to do it over and over again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ajasja Ljubetič</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-234</link>
		<dc:creator>Ajasja Ljubetič</dc:creator>
		<pubDate>Wed, 05 May 2010 18:58:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-234</guid>
		<description>Why not just use http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html ?</description>
		<content:encoded><![CDATA[<p>Why not just use <a href="http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html" rel="nofollow">http://ruby-doc.org/stdlib/libdoc/ostruct/rdoc/classes/OpenStruct.html</a> ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: kerry</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-233</link>
		<dc:creator>kerry</dc:creator>
		<pubDate>Mon, 26 Apr 2010 15:57:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-233</guid>
		<description>yea, Groovy has some nice features.  I have been using JRuby lately at work though.</description>
		<content:encoded><![CDATA[<p>yea, Groovy has some nice features.  I have been using JRuby lately at work though.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chad O</title>
		<link>http://www.goodercode.com/wp/convert-your-hash-keys-to-object-properties-in-ruby/comment-page-1/#comment-232</link>
		<dc:creator>Chad O</dc:creator>
		<pubDate>Sat, 24 Apr 2010 20:12:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.goodercode.com/wp/?p=31#comment-232</guid>
		<description>Thanks!

I'm a Ruby (and programming in general) n00b, so this seems fantastic to me! I'll have to ask my coworkers what they think and get some more experienced feedback.

But I went to a presentation on REST with Groovy, and was started to discover that Ruby didn't match up. So good work!</description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>I&#8217;m a Ruby (and programming in general) n00b, so this seems fantastic to me! I&#8217;ll have to ask my coworkers what they think and get some more experienced feedback.</p>
<p>But I went to a presentation on REST with Groovy, and was started to discover that Ruby didn&#8217;t match up. So good work!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
