<?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>Easy Ruby On Rails Programming &#187; Closures</title>
	<atom:link href="http://easyrubyonrailsprogramming.com/tag/closures/feed/" rel="self" type="application/rss+xml" />
	<link>http://easyrubyonrailsprogramming.com</link>
	<description>The Place to be to Learn Ruby On Rails</description>
	<lastBuildDate>Sat, 24 Dec 2011 05:30:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Blocks as Closures (Part 1)</title>
		<link>http://easyrubyonrailsprogramming.com/development/blocks-as-closures-part-1/</link>
		<comments>http://easyrubyonrailsprogramming.com/development/blocks-as-closures-part-1/#comments</comments>
		<pubDate>Tue, 01 Apr 2008 10:02:44 +0000</pubDate>
		<dc:creator>Avatar</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Programming Basics]]></category>
		<category><![CDATA[Blocks]]></category>
		<category><![CDATA[Closures]]></category>

		<guid isPermaLink="false">http://easyrubyonrailsprogramming.com/development/blocks-as-closures-part-1/</guid>
		<description><![CDATA[As it turns out, blocks are the ideal tool for use ion implementing user interfaces where we have a defined graphic that signifies a button and pressing that button would result in a pre-set series of processes. A simple button definition can be: bPlay = Button.new(&#8220;Play&#8221;) bPause = Button.new(&#8220;Pause&#8221;) # so on and so forth&#8230;&#8230; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.mirandabanda.org/cogblog/2008/07/22/closures-part-ii-the-bytecodes/"><img src="/wp-content/uploads/scraped/32.jpg"/></a>
<p>As it turns out, blocks are the ideal tool for use ion implementing user interfaces where we have a defined graphic that signifies a button and pressing that button would result in a pre-set series of processes. A simple button definition can be:</p>
<p>bPlay = Button.new(&#8220;Play&#8221;)<br />
bPause = Button.new(&#8220;Pause&#8221;)<br />
# so on and so forth&#8230;&#8230;</p>
<p>If a user presses any of the buttons it calls on the pre-set reactions/processes that are supposed to happen if the user requests that action, say a method called &#8220;buttonSelected&#8221; will be called upon. The said method would then have to have it’s own method as a sub-class of the button action sub-class. This can be done by defining the sub-class such as the sample code in the next post would show.</p>
]]></content:encoded>
			<wfw:commentRss>http://easyrubyonrailsprogramming.com/development/blocks-as-closures-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

