<?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>furmanek.net &#187; Uncategorized</title>
	<atom:link href="http://www.furmanek.net/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.furmanek.net</link>
	<description>Greg Furmanek's personal blog</description>
	<lastBuildDate>Fri, 16 Jul 2010 22:29:57 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Ruby Metaprogramming quiz #1</title>
		<link>http://www.furmanek.net/250/ruby-metaprogramming-quiz-1/</link>
		<comments>http://www.furmanek.net/250/ruby-metaprogramming-quiz-1/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 21:36:27 +0000</pubDate>
		<dc:creator>Gregory Furmanek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=250</guid>
		<description><![CDATA[Implement only MyHelper module and make the tests pass. Good luck.

View Code RUBYrequire 'test/unit'
&#160;
module MyHelper
&#160;
end
&#160;
class Foo
  BAR = 1
  NORM = 3
  include MyHelper
end
&#160;
class Baz
  BAR = 2
  NORM = 4
  include MyHelper
end
&#160;
class MyTest &#60; Test::Unit::TestCase
  def test_Foo
    foo = Foo.new
    assert_equal&#40;1, [...]]]></description>
			<content:encoded><![CDATA[<p>Implement only MyHelper module and make the tests pass. Good luck.</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p250code2'); return false;">View Code</a> RUBY</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2502"><td class="code" id="p250code2"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'test/unit'</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">module</span> MyHelper
&nbsp;
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Foo
  BAR = <span style="color:#006666;">1</span>
  NORM = <span style="color:#006666;">3</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> MyHelper
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> Baz
  BAR = <span style="color:#006666;">2</span>
  NORM = <span style="color:#006666;">4</span>
  <span style="color:#9966CC; font-weight:bold;">include</span> MyHelper
<span style="color:#9966CC; font-weight:bold;">end</span>
&nbsp;
<span style="color:#9966CC; font-weight:bold;">class</span> MyTest <span style="color:#006600; font-weight:bold;">&lt;</span> <span style="color:#6666ff; font-weight:bold;">Test::Unit::TestCase</span>
  <span style="color:#9966CC; font-weight:bold;">def</span> test_Foo
    foo = Foo.<span style="color:#9900CC;">new</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>, foo.<span style="color:#9900CC;">score</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>, Foo.<span style="color:#9900CC;">bar</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">1</span>, foo.<span style="color:#9900CC;">bar</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span>, Foo.<span style="color:#9900CC;">norm</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">3</span>, foo.<span style="color:#9900CC;">norm</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> test_Baz
    baz = Baz.<span style="color:#9900CC;">new</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2</span>, baz.<span style="color:#9900CC;">score</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2</span>, Baz.<span style="color:#9900CC;">bar</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">2</span>, baz.<span style="color:#9900CC;">bar</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">4</span>, Baz.<span style="color:#9900CC;">norm</span><span style="color:#006600; font-weight:bold;">&#41;</span>
    assert_equal<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006666;">4</span>, baz.<span style="color:#9900CC;">norm</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;">end</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/250/ruby-metaprogramming-quiz-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tidy incantations</title>
		<link>http://www.furmanek.net/238/tidy-incantations/</link>
		<comments>http://www.furmanek.net/238/tidy-incantations/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 15:51:01 +0000</pubDate>
		<dc:creator>Gregory Furmanek</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.furmanek.net/?p=238</guid>
		<description><![CDATA[I have been using tidy on and off for a few years now and it&#8217;s been a great tool for finding problems with the html markup.  I always wanted to use it for reformatting (cleaning up) output.  Especially wanted it for reformatting xml output of some web services that have a nasty habit [...]]]></description>
			<content:encoded><![CDATA[<p>I have been using tidy on and off for a few years now and it&#8217;s been a great tool for finding problems with the html markup.  I always wanted to use it for reformatting (cleaning up) output.  Especially wanted it for reformatting xml output of some web services that have a nasty habit of putting the whole content on a single line.</p>
<p>But now I have found the right incantation:</p>

<div class="wp_codebox_msgheader"><span class="right"></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p238code4'); return false;">View Code</a> SH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table width="100%" ><tr id="p2384"><td class="code" id="p238code4"><pre class="sh" style="font-family:monospace;">&nbsp;
$ cat source_file.xml | tidy -q -xml -i -w 300 &gt; reformatted_file.xml</pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.furmanek.net/238/tidy-incantations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
