<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Schand10</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Schand10"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Schand10"/>
	<updated>2026-06-30T19:09:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70075</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w49 ps</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70075"/>
		<updated>2012-11-18T05:08:28Z</updated>

		<summary type="html">&lt;p&gt;Schand10: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''Template Method Pattern - Directory of Sites'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a directory of sites that can be used as reference to learn about Template Method Pattern in [http://en.wikipedia.org/wiki/Object-oriented_design Object oriented design] &lt;br /&gt;
&lt;br /&gt;
==Directory of Sites==&lt;br /&gt;
===1. Template method pattern (Wikipedia)===&lt;br /&gt;
   &lt;br /&gt;
   http://en.wikipedia.org/wiki/Template_method_pattern&lt;br /&gt;
&lt;br /&gt;
This is the first reference site that everyone uses to learn about an established fact. The site offers a very good introduction to template method pattern and is well organized. It also provides an example for the usage of template pattern in Java. The site also explains briefly why we need to use template pattern.  It also explains the concept with the help of UML diagrams in a simple way.&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
The site does not compare this pattern with other design patterns. If we need to compare we have to read through other wikis on design patterns and should understand the differences by self. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. Template Method (oodesign.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.oodesign.com/template-method-pattern.html&lt;br /&gt;
&lt;br /&gt;
This is a very good site to learn about design patterns in general and provides a good explanation for Template Method Patterns also. The site is very informative and detailed. The organization of the content is very good and is done in a simple manner. The site also provides specific problems and implementations. The site also provides a brief view on the comparison between template method pattern and the most closest, strategy pattern. There is a section which summarizes the hot points to be noted while using Template Method Pattern. The site also provides multiple examples and UML diagrams which make the content easy to comprehend.&lt;br /&gt;
&lt;br /&gt;
===3. Template Method Design Pattern (dofactory.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.dofactory.com/Patterns/PatternTemplate.aspx&lt;br /&gt;
&lt;br /&gt;
The site is a very good reference when it comes to examples of using template method pattern. The description about the pattern in words is very limited. But the examples provide a very easy way to understand the pattern. The major advantage is, it gives the usage of template pattern in multiple OO languages like Java, C# and a real world example. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. The description does not cover all the necessary details about the pattern&lt;br /&gt;
2. Comparison with other patterns are not present&lt;br /&gt;
3. Does not justify the requirement of using template pattern&lt;br /&gt;
&lt;br /&gt;
===4. Patterns I Hate #2: Template Method (Blog)===&lt;br /&gt;
&lt;br /&gt;
   http://tech.puredanger.com/2007/07/03/pattern-hate-template/&lt;br /&gt;
&lt;br /&gt;
This is not a site to understand the template method pattern. Rather, this site is very informative in understanding the disadvantages of using template method pattern. Before referring this site, you should be aware of the template method pattern. The site provides alternatives to the use of template pattern. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. No reference to the actual description about template method pattern.&lt;br /&gt;
2. Examples are difficult to understand with the limited explanation&lt;br /&gt;
&lt;br /&gt;
===5. Similarities/Differences between template method pattern and strategy pattern? (Stack overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/10376024/is-there-similarities-between-template-method-pattern-and-strategy-pattern&lt;br /&gt;
&lt;br /&gt;
This link is very informative in understanding the differences between the template pattern and the strategy pattern. The site provides several posts from many people which could be a good way to get different views about template pattern and other design patterns. It also makes use of an example to understand the differences between template design pattern and strategy pattern.&lt;br /&gt;
&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. Not a reference page to learn about template design pattern. It can only provide comparisons.&lt;br /&gt;
&lt;br /&gt;
===6. Where should we use Template Method - pattern? (Stack Overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/1553856/where-should-we-use-template-method-pattern&lt;br /&gt;
&lt;br /&gt;
This site provides a good insight towards understanding when the Template method pattern should be used. The examples provided can give a good idea about the usage of template method pattern. This is not a site that can be used to learn template method pattern. It assumes prior knowledge about design patterns in general.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===7. Template method design patterns in Java/J2EE (Javabeat.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The Site gives a crisp definition of the pattern and there after gives an example as to how one can implement the pattern Template. It supports the example with a code in java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===8. Template Method in Java (SourceMaking.com)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method/java/2&lt;br /&gt;
&lt;br /&gt;
The site describes the pattern in the form of summary points and supports the same with a  code in java that merely explains the usage of the pattern.&lt;br /&gt;
&lt;br /&gt;
===9. Design Patterns Uncovered: The Template Method Pattern (DZone)===&lt;br /&gt;
&lt;br /&gt;
   http://java.dzone.com/articles/design-patterns-template-method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern with a real world example. It subsequently gives a clear definition of the pattern. It also provides a diagrammatic representation of the pattern in the form of a UML diagram. It elaborates the on Abstract and concrete classes required to  implement the pattern. It further explains when we one should use the pattern supporting it with an example. The article ends with a java code implementation for an abstract compiler class that is varyingly used for different compiler classes.&lt;br /&gt;
&lt;br /&gt;
===10. Template Method Design Pattern (BlackWasp)===&lt;br /&gt;
&lt;br /&gt;
   http://www.blackwasp.co.uk/TemplateMethod.aspx&lt;br /&gt;
&lt;br /&gt;
The site gives a brief overview of the pattern and also talks about the difference between a very similar strategy pattern and template pattern. It also provides arguments in support of the pattern and its advantages. An example of algorithms with similar steps is presented to explain the concept.&lt;br /&gt;
&lt;br /&gt;
===11. Template Method Design Patterns (SourceMaking)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern by providing the reader with the reason as to why we need the pattern. Thereafter a discussion is presented that explains the concept of hooks and placeholders. The discussion also presents a diagrammatic representation of the real world scenario.&lt;br /&gt;
&lt;br /&gt;
===12. Template method Pattern – Design Patterns in Java/J2EE (JavaBeat)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The site provides the definition of the pattern and puts across an example of using the pattern in loading and parsing data in oracle. It also suffices the explanation with 6 other real software problems where template pattern can be employed like ‘flexible extendable generalized specialized user interfaces’, ‘ASP.net page life cycle’, ‘code generators’, ‘XML parsers’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Comparison Table==&lt;br /&gt;
&lt;br /&gt;
The table provides the comparison between the 12 of the websites that have useful information regarding Template Method Pattern. The websites are rated on certain parameters (shown in table) with the maximum rating being (☆☆☆☆) and the minimum ( nil ). The numeric count of the site is the same as represented above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Characteristic !! Site 1 !! Site 2 !! Site 3 !! Site 4 !! Site 5 !! Site 6 !! Site 7 !! Site 8 !! Site 9 !! Site 10 !! Site 11 !! Site 12&lt;br /&gt;
|-&lt;br /&gt;
| Clarity of content &amp;amp; fullness || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆ ||  || ☆ || ☆☆ || ☆☆ || ☆☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Most suitable examples(code) || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Comparison with closely related patterns ||  || ☆☆ ||  ||  || ☆☆☆ ||  ||  ||  ||  ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Structure of the represented information || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆☆ || ☆ || ☆ || ☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Real World usages ||  || ☆☆ || ☆☆☆☆ ||  ||  || ☆☆☆ ||  || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Disadvantages of the pattern ||  ||  ||  || ☆☆☆☆ ||  ||  ||  ||  || ☆☆☆ || ☆☆ ||  ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70074</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w49 ps</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70074"/>
		<updated>2012-11-18T05:06:54Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Summary Table */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''Template Method Pattern - Directory of Sites'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a directory of sites that can be used as reference to learn about Template Method Pattern in [http://en.wikipedia.org/wiki/Object-oriented_design Object oriented design] &lt;br /&gt;
&lt;br /&gt;
==Directory of Sites==&lt;br /&gt;
===1. Template method pattern (Wikipedia)===&lt;br /&gt;
   &lt;br /&gt;
   http://en.wikipedia.org/wiki/Template_method_pattern&lt;br /&gt;
&lt;br /&gt;
This is the first reference site that everyone uses to learn about an established fact. The site offers a very good introduction to template method pattern and is well organized. It also provides an example for the usage of template pattern in Java. The site also explains briefly why we need to use template pattern.  It also explains the concept with the help of UML diagrams in a simple way.&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
The site does not compare this pattern with other design patterns. If we need to compare we have to read through other wikis on design patterns and should understand the differences by self. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. Template Method (oodesign.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.oodesign.com/template-method-pattern.html&lt;br /&gt;
&lt;br /&gt;
This is a very good site to learn about design patterns in general and provides a good explanation for Template Method Patterns also. The site is very informative and detailed. The organization of the content is very good and is done in a simple manner. The site also provides specific problems and implementations. The site also provides a brief view on the comparison between template method pattern and the most closest, strategy pattern. There is a section which summarizes the hot points to be noted while using Template Method Pattern. The site also provides multiple examples and UML diagrams which make the content easy to comprehend.&lt;br /&gt;
&lt;br /&gt;
===3. Template Method Design Pattern (dofactory.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.dofactory.com/Patterns/PatternTemplate.aspx&lt;br /&gt;
&lt;br /&gt;
The site is a very good reference when it comes to examples of using template method pattern. The description about the pattern in words is very limited. But the examples provide a very easy way to understand the pattern. The major advantage is, it gives the usage of template pattern in multiple OO languages like Java, C# and a real world example. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. The description does not cover all the necessary details about the pattern&lt;br /&gt;
2. Comparison with other patterns are not present&lt;br /&gt;
3. Does not justify the requirement of using template pattern&lt;br /&gt;
&lt;br /&gt;
===4. Patterns I Hate #2: Template Method (Blog)===&lt;br /&gt;
&lt;br /&gt;
   http://tech.puredanger.com/2007/07/03/pattern-hate-template/&lt;br /&gt;
&lt;br /&gt;
This is not a site to understand the template method pattern. Rather, this site is very informative in understanding the disadvantages of using template method pattern. Before referring this site, you should be aware of the template method pattern. The site provides alternatives to the use of template pattern. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. No reference to the actual description about template method pattern.&lt;br /&gt;
2. Examples are difficult to understand with the limited explanation&lt;br /&gt;
&lt;br /&gt;
===5. Similarities/Differences between template method pattern and strategy pattern? (Stack overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/10376024/is-there-similarities-between-template-method-pattern-and-strategy-pattern&lt;br /&gt;
&lt;br /&gt;
This link is very informative in understanding the differences between the template pattern and the strategy pattern. The site provides several posts from many people which could be a good way to get different views about template pattern and other design patterns. It also makes use of an example to understand the differences between template design pattern and strategy pattern.&lt;br /&gt;
&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. Not a reference page to learn about template design pattern. It can only provide comparisons.&lt;br /&gt;
&lt;br /&gt;
===6. Where should we use Template Method - pattern? (Stack Overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/1553856/where-should-we-use-template-method-pattern&lt;br /&gt;
&lt;br /&gt;
This site provides a good insight towards understanding when the Template method pattern should be used. The examples provided can give a good idea about the usage of template method pattern. This is not a site that can be used to learn template method pattern. It assumes prior knowledge about design patterns in general.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===7. Template method design patterns in Java/J2EE (Javabeat.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The Site gives a crisp definition of the pattern and there after gives an example as to how one can implement the pattern Template. It supports the example with a code in java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===8. Template Method in Java (SourceMaking.com)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method/java/2&lt;br /&gt;
&lt;br /&gt;
The site describes the pattern in the form of summary points and supports the same with a  code in java that merely explains the usage of the pattern.&lt;br /&gt;
&lt;br /&gt;
===9. Design Patterns Uncovered: The Template Method Pattern (DZone)===&lt;br /&gt;
&lt;br /&gt;
   http://java.dzone.com/articles/design-patterns-template-method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern with a real world example. It subsequently gives a clear definition of the pattern. It also provides a diagrammatic representation of the pattern in the form of a UML diagram. It elaborates the on Abstract and concrete classes required to  implement the pattern. It further explains when we one should use the pattern supporting it with an example. The article ends with a java code implementation for an abstract compiler class that is varyingly used for different compiler classes.&lt;br /&gt;
&lt;br /&gt;
===10. Template Method Design Pattern (BlackWasp)===&lt;br /&gt;
&lt;br /&gt;
   http://www.blackwasp.co.uk/TemplateMethod.aspx&lt;br /&gt;
&lt;br /&gt;
The site gives a brief overview of the pattern and also talks about the difference between a very similar strategy pattern and template pattern. It also provides arguments in support of the pattern and its advantages. An example of algorithms with similar steps is presented to explain the concept.&lt;br /&gt;
&lt;br /&gt;
===11. Template Method Design Patterns (SourceMaking)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern by providing the reader with the reason as to why we need the pattern. Thereafter a discussion is presented that explains the concept of hooks and placeholders. The discussion also presents a diagrammatic representation of the real world scenario.&lt;br /&gt;
&lt;br /&gt;
===12. Template method Pattern – Design Patterns in Java/J2EE (JavaBeat)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The site provides the definition of the pattern and puts across an example of using the pattern in loading and parsing data in oracle. It also suffices the explanation with 6 other real software problems where template pattern can be employed like ‘flexible extendable generalized specialized user interfaces’, ‘ASP.net page life cycle’, ‘code generators’, ‘XML parsers’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary Table==&lt;br /&gt;
&lt;br /&gt;
The table provides the comparison between the 12 of the websites that have useful information regarding Template Method Pattern. The websites are rated on certain parameters (shown in table) with the maximum rating being (☆☆☆☆) and the minimum ( nil ). The numeric count of the site is the same as represented above.&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Characteristic !! Site 1 !! Site 2 !! Site 3 !! Site 4 !! Site 5 !! Site 6 !! Site 7 !! Site 8 !! Site 9 !! Site 10 !! Site 11 !! Site 12&lt;br /&gt;
|-&lt;br /&gt;
| Clarity of content &amp;amp; fullness || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆ ||  || ☆ || ☆☆ || ☆☆ || ☆☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Most suitable examples(code) || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Comparison with closely related patterns ||  || ☆☆ ||  ||  || ☆☆☆ ||  ||  ||  ||  ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Structure of the represented information || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆☆ || ☆ || ☆ || ☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Real World usages ||  || ☆☆ || ☆☆☆☆ ||  ||  || ☆☆☆ ||  || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Disadvantages of the pattern ||  ||  ||  || ☆☆☆☆ ||  ||  ||  ||  || ☆☆☆ || ☆☆ ||  ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70073</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w49 ps</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w49_ps&amp;diff=70073"/>
		<updated>2012-11-18T05:02:02Z</updated>

		<summary type="html">&lt;p&gt;Schand10: Created page with &amp;quot;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''Template Method Pattern - Directory of Sites'''  ==Introduction== This page provides a directory of sites that can be used as reference to learn abo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''Template Method Pattern - Directory of Sites'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
This page provides a directory of sites that can be used as reference to learn about Template Method Pattern in [http://en.wikipedia.org/wiki/Object-oriented_design Object oriented design] &lt;br /&gt;
&lt;br /&gt;
==Directory of Sites==&lt;br /&gt;
===1. Template method pattern (Wikipedia)===&lt;br /&gt;
   &lt;br /&gt;
   http://en.wikipedia.org/wiki/Template_method_pattern&lt;br /&gt;
&lt;br /&gt;
This is the first reference site that everyone uses to learn about an established fact. The site offers a very good introduction to template method pattern and is well organized. It also provides an example for the usage of template pattern in Java. The site also explains briefly why we need to use template pattern.  It also explains the concept with the help of UML diagrams in a simple way.&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
The site does not compare this pattern with other design patterns. If we need to compare we have to read through other wikis on design patterns and should understand the differences by self. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===2. Template Method (oodesign.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.oodesign.com/template-method-pattern.html&lt;br /&gt;
&lt;br /&gt;
This is a very good site to learn about design patterns in general and provides a good explanation for Template Method Patterns also. The site is very informative and detailed. The organization of the content is very good and is done in a simple manner. The site also provides specific problems and implementations. The site also provides a brief view on the comparison between template method pattern and the most closest, strategy pattern. There is a section which summarizes the hot points to be noted while using Template Method Pattern. The site also provides multiple examples and UML diagrams which make the content easy to comprehend.&lt;br /&gt;
&lt;br /&gt;
===3. Template Method Design Pattern (dofactory.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.dofactory.com/Patterns/PatternTemplate.aspx&lt;br /&gt;
&lt;br /&gt;
The site is a very good reference when it comes to examples of using template method pattern. The description about the pattern in words is very limited. But the examples provide a very easy way to understand the pattern. The major advantage is, it gives the usage of template pattern in multiple OO languages like Java, C# and a real world example. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. The description does not cover all the necessary details about the pattern&lt;br /&gt;
2. Comparison with other patterns are not present&lt;br /&gt;
3. Does not justify the requirement of using template pattern&lt;br /&gt;
&lt;br /&gt;
===4. Patterns I Hate #2: Template Method (Blog)===&lt;br /&gt;
&lt;br /&gt;
   http://tech.puredanger.com/2007/07/03/pattern-hate-template/&lt;br /&gt;
&lt;br /&gt;
This is not a site to understand the template method pattern. Rather, this site is very informative in understanding the disadvantages of using template method pattern. Before referring this site, you should be aware of the template method pattern. The site provides alternatives to the use of template pattern. &lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. No reference to the actual description about template method pattern.&lt;br /&gt;
2. Examples are difficult to understand with the limited explanation&lt;br /&gt;
&lt;br /&gt;
===5. Similarities/Differences between template method pattern and strategy pattern? (Stack overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/10376024/is-there-similarities-between-template-method-pattern-and-strategy-pattern&lt;br /&gt;
&lt;br /&gt;
This link is very informative in understanding the differences between the template pattern and the strategy pattern. The site provides several posts from many people which could be a good way to get different views about template pattern and other design patterns. It also makes use of an example to understand the differences between template design pattern and strategy pattern.&lt;br /&gt;
&lt;br /&gt;
====Drawbacks====&lt;br /&gt;
1. Not a reference page to learn about template design pattern. It can only provide comparisons.&lt;br /&gt;
&lt;br /&gt;
===6. Where should we use Template Method - pattern? (Stack Overflow)===&lt;br /&gt;
&lt;br /&gt;
   http://stackoverflow.com/questions/1553856/where-should-we-use-template-method-pattern&lt;br /&gt;
&lt;br /&gt;
This site provides a good insight towards understanding when the Template method pattern should be used. The examples provided can give a good idea about the usage of template method pattern. This is not a site that can be used to learn template method pattern. It assumes prior knowledge about design patterns in general.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===7. Template method design patterns in Java/J2EE (Javabeat.com)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The Site gives a crisp definition of the pattern and there after gives an example as to how one can implement the pattern Template. It supports the example with a code in java.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===8. Template Method in Java (SourceMaking.com)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method/java/2&lt;br /&gt;
&lt;br /&gt;
The site describes the pattern in the form of summary points and supports the same with a  code in java that merely explains the usage of the pattern.&lt;br /&gt;
&lt;br /&gt;
===9. Design Patterns Uncovered: The Template Method Pattern (DZone)===&lt;br /&gt;
&lt;br /&gt;
   http://java.dzone.com/articles/design-patterns-template-method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern with a real world example. It subsequently gives a clear definition of the pattern. It also provides a diagrammatic representation of the pattern in the form of a UML diagram. It elaborates the on Abstract and concrete classes required to  implement the pattern. It further explains when we one should use the pattern supporting it with an example. The article ends with a java code implementation for an abstract compiler class that is varyingly used for different compiler classes.&lt;br /&gt;
&lt;br /&gt;
===10. Template Method Design Pattern (BlackWasp)===&lt;br /&gt;
&lt;br /&gt;
   http://www.blackwasp.co.uk/TemplateMethod.aspx&lt;br /&gt;
&lt;br /&gt;
The site gives a brief overview of the pattern and also talks about the difference between a very similar strategy pattern and template pattern. It also provides arguments in support of the pattern and its advantages. An example of algorithms with similar steps is presented to explain the concept.&lt;br /&gt;
&lt;br /&gt;
===11. Template Method Design Patterns (SourceMaking)===&lt;br /&gt;
&lt;br /&gt;
   http://sourcemaking.com/design_patterns/template_method&lt;br /&gt;
&lt;br /&gt;
The site introduces the pattern by providing the reader with the reason as to why we need the pattern. Thereafter a discussion is presented that explains the concept of hooks and placeholders. The discussion also presents a diagrammatic representation of the real world scenario.&lt;br /&gt;
&lt;br /&gt;
===12. Template method Pattern – Design Patterns in Java/J2EE (JavaBeat)===&lt;br /&gt;
&lt;br /&gt;
   http://www.javabeat.net/2007/08/template-method-pattern-design-patterns-in-javaj2ee/&lt;br /&gt;
&lt;br /&gt;
The site provides the definition of the pattern and puts across an example of using the pattern in loading and parsing data in oracle. It also suffices the explanation with 6 other real software problems where template pattern can be employed like ‘flexible extendable generalized specialized user interfaces’, ‘ASP.net page life cycle’, ‘code generators’, ‘XML parsers’.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Summary Table==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Characteristic !! Site 1 !! Site 2 !! Site 3 !! Site 4 !! Site 5 !! Site 6 !! Site 7 !! Site 8 !! Site 9 !! Site 10 !! Site 11 !! Site 12&lt;br /&gt;
|-&lt;br /&gt;
| Clarity of content &amp;amp; fullness || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆ ||  || ☆ || ☆☆ || ☆☆ || ☆☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Most suitable examples(code) || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆☆ || ☆☆☆ || ☆☆☆ || ☆☆ || ☆☆☆☆ &lt;br /&gt;
|-&lt;br /&gt;
| Comparison with closely related patterns ||  || ☆☆ ||  ||  || ☆☆☆ ||  ||  ||  ||  ||  ||  ||&lt;br /&gt;
|-&lt;br /&gt;
| Structure of the represented information || ☆☆☆☆ || ☆☆☆☆ || ☆☆ || ☆☆ || ☆ || ☆ || ☆☆ || ☆☆ || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Real World usages ||  || ☆☆ || ☆☆☆☆ ||  ||  || ☆☆☆ ||  || ☆☆☆ || ☆☆ || ☆☆☆ || ☆☆☆ || ☆☆☆☆&lt;br /&gt;
|-&lt;br /&gt;
| Disadvantages of the pattern ||  ||  ||  || ☆☆☆☆ ||  ||  ||  ||  || ☆☆☆ || ☆☆ ||  ||&lt;br /&gt;
|}&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=70053</id>
		<title>CSC/ECE 517 Fall 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=70053"/>
		<updated>2012-11-18T03:42:59Z</updated>

		<summary type="html">&lt;p&gt;Schand10: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE_517_Fall_2012/Table_Of_Contents]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 n xx]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w1 rk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w20 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w5 su]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w6 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w4 aj]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w7 am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w8 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w9 av]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w10 pk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w11 ap]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w12 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w14 gv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w17 ir]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w18 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w22 an]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 wi]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w31 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w16 br]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w23 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w24 nr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w15 rt]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w3 pl]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w32 cm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w5 dp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w37 ss]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w67 ks]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w27 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w29 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w33 op]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w19 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w34 vd]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w35 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w30 rp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w58 am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w47 sk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w69 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w44 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w45 is]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w53 kc]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 ar]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w39 sn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w54 go]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w56 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w64 nn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w66 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w42 js]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w46 sm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w71 gs]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w63 dv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w55 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w57 mp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w52 an]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch1b 1w38 nm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w60 ac]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w62 rb]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w29 st]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w3_sm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w30 an]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w17 pt]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w31 up]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w9 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w19 is]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w26 aj]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w5 dp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w16 dp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w8 vp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w18 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w3 jm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w23 sr]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w11_aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w15 rr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2a 2w33 pv]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w20_aa]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w14_bb]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w21_ap]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w13_sm]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w4_sa]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w25_nr]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w12_sv]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w7_ma]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w6_ar]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w32_mk]]&lt;br /&gt;
*[[CSC/ECE_517_Fall_2012/ch2a_2w10_rc]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w70_sm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w67_sk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w40_sn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w22_sk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w-1w65_am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w59_bc]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w60_ns]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w69_as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w39_ka]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w36_av]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w37_ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w43_iv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w53_iv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w63_sp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch2b_2w49_ps]]&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67478</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67478"/>
		<updated>2012-10-11T01:25:11Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Creating an object from the class */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data [http://en.wikipedia.org/wiki/Variable_%28computer_science%29 variables] and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the [http://en.wikipedia.org/wiki/Keyword_%28computer_programming%29 keyword] ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
Another Example:&lt;br /&gt;
&lt;br /&gt;
   class Person&lt;br /&gt;
     attr_reader :name, :age&lt;br /&gt;
     def initialize(name, age)&lt;br /&gt;
       @name, @age = name, age&lt;br /&gt;
     end&lt;br /&gt;
   end&lt;br /&gt;
  &lt;br /&gt;
  # create 3 objects of class Person &lt;br /&gt;
  p1 = Person.new(&amp;quot;Bob&amp;quot;, 33),&lt;br /&gt;
  p2 = Person.new(&amp;quot;Chris&amp;quot;, 16),&lt;br /&gt;
  p3 = Person.new(&amp;quot;Ash&amp;quot;, 23)&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-[http://en.wikipedia.org/wiki/Parameter_%28computer_programming%29#Parameters_and_arguments argument] calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67474</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67474"/>
		<updated>2012-10-11T00:54:45Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Poetry Mode */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data [http://en.wikipedia.org/wiki/Variable_%28computer_science%29 variables] and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the [http://en.wikipedia.org/wiki/Keyword_%28computer_programming%29 keyword] ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-[http://en.wikipedia.org/wiki/Parameter_%28computer_programming%29#Parameters_and_arguments argument] calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67473</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67473"/>
		<updated>2012-10-11T00:51:00Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Destructive Methods */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data [http://en.wikipedia.org/wiki/Variable_%28computer_science%29 variables] and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the [http://en.wikipedia.org/wiki/Keyword_%28computer_programming%29 keyword] ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67472</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67472"/>
		<updated>2012-10-11T00:48:52Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Defining a Ruby class */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data [http://en.wikipedia.org/wiki/Variable_%28computer_science%29 variables] and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the [http://en.wikipedia.org/wiki/Keyword_%28computer_programming%29 keyword] ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67471</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67471"/>
		<updated>2012-10-11T00:46:25Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* What is an Object? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data [http://en.wikipedia.org/wiki/Variable_%28computer_science%29 variables] and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67470</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67470"/>
		<updated>2012-10-11T00:44:33Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* What is an Object? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a [http://en.wikipedia.org/wiki/Application_software software application].&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67469</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67469"/>
		<updated>2012-10-11T00:43:11Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a [http://en.wikipedia.org/wiki/Method_%28computer_programming%29 method] call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67468</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67468"/>
		<updated>2012-10-11T00:29:50Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf  Section 6, 6.1, 13, 13.3&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67467</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67467"/>
		<updated>2012-10-11T00:22:16Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Every operation is a method call */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’. &lt;br /&gt;
&lt;br /&gt;
Note: a.b does NOT mean that &amp;quot;b&amp;quot; is an instance variable of &amp;quot;a&amp;quot; OR &amp;quot;a&amp;quot; is some kind of data structure that has &amp;quot;b&amp;quot; as a member.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67466</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67466"/>
		<updated>2012-10-11T00:16:38Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;br /&gt;
#http://www.mentby.com/david-a-black/are-methods-objects.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67465</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67465"/>
		<updated>2012-10-11T00:14:35Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
#http://www.zenspider.com/Languages/Ruby/QuickRef.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67464</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67464"/>
		<updated>2012-10-11T00:13:25Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_classes.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67463</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67463"/>
		<updated>2012-10-11T00:12:18Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/index.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67461</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67461"/>
		<updated>2012-10-11T00:11:38Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
#http://ruby.activeventure.com/programmingruby/book/tut_methods.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67459</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67459"/>
		<updated>2012-10-11T00:10:13Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2009/01/ruby-methods-part-4-calling-methods.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67456</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67456"/>
		<updated>2012-10-11T00:09:04Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-classes.html&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67455</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67455"/>
		<updated>2012-10-11T00:08:17Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;br /&gt;
#http://strugglingwithruby.blogspot.com/2008/12/ruby-methods-part-1-basics.html&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67454</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67454"/>
		<updated>2012-10-11T00:07:16Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Further Reading */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;br /&gt;
#http://eli.thegreenplace.net/2006/04/18/understanding-ruby-blocks-procs-and-methods/&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67451</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=67451"/>
		<updated>2012-10-11T00:02:51Z</updated>

		<summary type="html">&lt;p&gt;Schand10: /* Everything is an Object */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] make use of different entities like objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent, flexible and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used in an application. They serve as building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object so as to perform certain tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object about the methods it could respond to by calling a member function on the object.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows a more simplified approach which is influenced by the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language. It involves giving methods and [http://en.wikipedia.org/wiki/Instance_variable instance variables] to all of its types. This eases one’s use of Ruby. Since Ruby is made up of objects, the rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what functions they will perform. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate directly on the data. Rather than operating from outside the object; the objects have some understanding of how to operate on themselves. Messages are passed to an object, and those messages will generally elicit some kind of an action or meaningful reply depending on whether the object responds to that method. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify the original copy of an object (in-place) and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object (modified in-place), reflecting the results of the action (capitalizing a string, sorting an array, and so on). Each method has a destructive as well as a non-destructive version. The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, a new copy is created and a new object is obtained. If you call the destructive version (with ‘!’), you operate in-place on the same object to which the message is sent and the object is destructively modified.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses. It is used to simplify the method calls. Ruby prefers convention over configuration.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. The entire Ruby code is made up of only objects and method calls. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66496</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66496"/>
		<updated>2012-10-03T21:16:15Z</updated>

		<summary type="html">&lt;p&gt;Schand10: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] divide the world between objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used as the building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object to perform tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object, which all methods it responds to.&lt;br /&gt;
&lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
   It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows the influence of the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language by giving methods and instance variables to all of its types. This eases one’s use of Ruby, since rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what their function will be. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate on the data directly from outside the object; rather the objects have some understanding of how to operate on themselves. We pass messages to an object, and those messages will generally elicit some kind of an action or meaningful reply. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify an object in-place and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, you get a new object. If you call the destructive version (with ‘!’), you operate in-place on the same object to which you sent the message.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
   This will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, &lt;br /&gt;
   y &amp;lt;&amp;lt; [6,7] &lt;br /&gt;
   will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66487</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66487"/>
		<updated>2012-10-03T21:00:57Z</updated>

		<summary type="html">&lt;p&gt;Schand10: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;p style=&amp;quot;font-size: 20px&amp;quot;&amp;gt;'''SaaS - 3.2, 3.3 - Ruby Objects and Methods'''&lt;br /&gt;
&lt;br /&gt;
==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] divide the world between objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used as the building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object to perform tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object, which all methods it responds to. &lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
   1.It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   2.Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows the influence of the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language by giving methods and instance variables to all of its types. This eases one’s use of Ruby, since rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what their function will be. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate on the data directly from outside the object; rather the objects have some understanding of how to operate on themselves. We pass messages to an object, and those messages will generally elicit some kind of an action or meaningful reply. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify an object in-place and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, you get a new object. If you call the destructive version (with ‘!’), you operate in-place on the same object to which you sent the message.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
&lt;br /&gt;
The above example will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, y &amp;lt;&amp;lt; [6,7] will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66485</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w55 ms</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w55_ms&amp;diff=66485"/>
		<updated>2012-10-03T20:57:46Z</updated>

		<summary type="html">&lt;p&gt;Schand10: Created page with &amp;quot;==Introduction== [http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_%28programming_language%29 Ruby] is purely an [http://en.wikipedia.org/wiki/Object-oriented_language object-oriented language]. In Ruby, everything is an [http://en.wikipedia.org/wiki/Object_%28computer_science%29 object] and every operation is a method call on some object. In contrast, hybrid languages such as [http://en.wikipedia.org/wiki/C%2B%2B C++] and [http://en.wikipedia.org/wiki/Java Java] divide the world between objects and [http://en.wikipedia.org/wiki/Primitive_type primitive types]. The hybrid approach yields better performance, but the pure object-oriented approach is more consistent and simpler to use.&lt;br /&gt;
==Objects In Ruby==&lt;br /&gt;
===What is an Object?===&lt;br /&gt;
An object is a self-contained piece of functionality that can be easily used, and re-used as the building blocks for a software application.&lt;br /&gt;
&lt;br /&gt;
Objects consist of data variables and functions (called methods) that can be accessed and called on the object to perform tasks. These are collectively referred to as members.&lt;br /&gt;
&lt;br /&gt;
===Everything is an Object===&lt;br /&gt;
Just about everything in Ruby, from numbers and strings to arrays is an object.&lt;br /&gt;
In Ruby, we can ask any object, which all methods it responds to. &lt;br /&gt;
Examples:&lt;br /&gt;
&lt;br /&gt;
   1.It considers even an integer as an object.&lt;br /&gt;
     57.methods&lt;br /&gt;
     It returns the entire list of methods that the “object” 57 responds to.&lt;br /&gt;
&lt;br /&gt;
   2.Ruby considers “nil” as an object too.&lt;br /&gt;
     nil.respond_to?(:to_s)&lt;br /&gt;
     It returns ‘true’ or ‘false’ depending on whether ‘nil’ responds to the method ‘to_s’.&lt;br /&gt;
     (It does respond to the method and so returns ‘true’.)&lt;br /&gt;
&lt;br /&gt;
In many languages, numbers and other primitive types are not objects. Ruby follows the influence of the [http://en.wikipedia.org/wiki/Smalltalk Smalltalk] language by giving methods and instance variables to all of its types. This eases one’s use of Ruby, since rules applying to objects apply to all of Ruby.&lt;br /&gt;
&lt;br /&gt;
===Creation of Objects===&lt;br /&gt;
Before understanding how we create objects, we define what is a [http://en.wikipedia.org/wiki/Class_in_object-oriented_programming Class].&lt;br /&gt;
&lt;br /&gt;
====What is a Class?====&lt;br /&gt;
A Class defines a type of data structure. It defines the various methods and member variables used by the object and what their function will be. It is a way of defining common behavior for all of the objects that are of that class type. An object is nothing but an [http://en.wikipedia.org/wiki/Instance_%28computer_science%29 instance] of a class.&lt;br /&gt;
&lt;br /&gt;
====Defining a Ruby class====&lt;br /&gt;
For defining Classes, we use the keyword ‘class’ followed by the keyword ‘end’ and the class must be given a name by which it can be referenced. This name being a constant must begin with a capital letter.&lt;br /&gt;
We can illustrate this using an example:&lt;br /&gt;
&lt;br /&gt;
  class Student&lt;br /&gt;
    def initialize ()&lt;br /&gt;
    end&lt;br /&gt;
    def test_method&lt;br /&gt;
       puts &amp;quot;The class is working&amp;quot;&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
====Creating an object from the class====&lt;br /&gt;
An object can be created from a class using the ‘new’ method. For example, to create an instance of a Student class we perform the following:&lt;br /&gt;
&lt;br /&gt;
   student = Student.new()&lt;br /&gt;
&lt;br /&gt;
This creates a Student object named ‘student’.&lt;br /&gt;
Upon the created object we can call the method ‘test_method’ by using the following:&lt;br /&gt;
&lt;br /&gt;
   student.test_method&lt;br /&gt;
   The class is working&lt;br /&gt;
&lt;br /&gt;
==Methods==&lt;br /&gt;
===What is a Method?===&lt;br /&gt;
In Object-Oriented Programming, we do not operate on the data directly from outside the object; rather the objects have some understanding of how to operate on themselves. We pass messages to an object, and those messages will generally elicit some kind of an action or meaningful reply. The tasks we are allowed to ask an object to perform (or equivalently, the messages it understands) are that object's methods.&lt;br /&gt;
&lt;br /&gt;
===Every operation is a method call===&lt;br /&gt;
In Ruby, we invoke a method on an object using a dot (.) notation, just as in C++ or Java. The object on which the method performs the action is placed on the left side of the dot.&lt;br /&gt;
Examples: &lt;br /&gt;
&lt;br /&gt;
   “abcdef”.length&lt;br /&gt;
   Output: 6&lt;br /&gt;
&lt;br /&gt;
Here the ‘length’ method is called upon the object “abcdef”. &lt;br /&gt;
Basically, everything in the language is syntactic sugar for doing a method call. So the above example implies the following:&lt;br /&gt;
&lt;br /&gt;
   “abcdef”.send(:length)&lt;br /&gt;
&lt;br /&gt;
‘send’ is a method that is defined by default on every object in Ruby. Here the method ‘length’ is sent to the object “abcdef”,  considering that the object “abcdef” will respond to the method ‘length’.&lt;br /&gt;
More Examples:&lt;br /&gt;
&lt;br /&gt;
   1 + 2		        =&amp;gt; 		1.send(:+ , 2)&lt;br /&gt;
   my_array[4]		=&amp;gt;		my_array.send(:[], 4)&lt;br /&gt;
   my_array[3] = “foo”	=&amp;gt;		my_array.send(:[]=, 3, “foo”)&lt;br /&gt;
   my_func(z)		=&amp;gt;		self.send(:my_func, z)&lt;br /&gt;
&lt;br /&gt;
In short, a.b means: call method ‘b’ on object ‘a’. So ‘a’ is the receiver to which you send the method call, assuming ‘a’ will respond to the method ‘b’.&lt;br /&gt;
&lt;br /&gt;
===Destructive Methods===&lt;br /&gt;
Ruby methods that modify an object in-place and end in an exclamation mark are known as destructive methods. By convention, the bang(!) labels a method as dangerous.&lt;br /&gt;
&lt;br /&gt;
The methods usually, perform an action and return a freshly minted object, reflecting the results of the action (capitalizing a string, sorting an array, and so on). The destructive versions of the same methods perform the action, but they do so in place: Instead of creating a new object, they transform the original object.&lt;br /&gt;
&lt;br /&gt;
Examples of such pairs of methods include sort/sort! for arrays, upcase/upcase! for strings, and reverse/reverse! for strings and arrays. In each case, if you call the non-destructive version of the method on the object, you get a new object. If you call the destructive version (with ‘!’), you operate in-place on the same object to which you sent the message.&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;
   y = y + [“foo”, :bar]&lt;br /&gt;
&lt;br /&gt;
The above example will create a new object which is a concatenation of ‘y’ and the [“foo”, :bar] array.&lt;br /&gt;
However, y &amp;lt;&amp;lt; [6,7] will destructively modify the receiver ‘y’ and ‘y’ will become the new array [6,7].&lt;br /&gt;
&lt;br /&gt;
===Poetry Mode===&lt;br /&gt;
The parentheses in method calls and hashes are always optional, not just for zero-argument calls. “Poetry mode in Ruby&amp;quot; is a bunch of method calls with no parentheses.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   a.should be &amp;gt;= 7&lt;br /&gt;
   =&amp;gt; a.should(be() &amp;gt;= 7)&lt;br /&gt;
   =&amp;gt; a.should(be.send(:&amp;gt;=, 7))&lt;br /&gt;
&lt;br /&gt;
Similarly parentheses in Hashes are also optional when hash is the last argument in the method call.&lt;br /&gt;
Example:&lt;br /&gt;
&lt;br /&gt;
   link_to “Edit”, :controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’&lt;br /&gt;
   =&amp;gt; link_to(“Edit”, {:controller =&amp;gt; ‘students’, :action =&amp;gt; ‘edit’})&lt;br /&gt;
&lt;br /&gt;
But in case there are multiple hashes then it is always advisable to put parentheses defensively.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
Thus we can conclude that objects and its methods provide the foundation on which object-oriented programming is based. Ruby being a pure object oriented language (everything is an object and every operation is a method call), has methods inherent to its nature. Ruby methods provide a way to organize code and promote re-use while defining the behavior of ruby objects belonging to a specific type.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
#http://www.youtube.com/watch?v=iWhGWPOpkbU&lt;br /&gt;
#http://www.ipa.go.jp/osc/english/ruby/Ruby_final_draft_enu_20100825.pdf&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Introduction_to_objects&lt;br /&gt;
#http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Method_Calls#Methods&lt;br /&gt;
#http://www.rubyist.net/~slagell/ruby/methods.html&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Object_Oriented_Programming#What_is_an_Object.3F&lt;br /&gt;
#http://www.techotopia.com/index.php/Ruby_Methods&lt;br /&gt;
#http://rubylearning.com/satishtalim/tutorial.html&lt;br /&gt;
#http://ruby-doc.org/docs/ProgrammingRuby/&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
&lt;br /&gt;
#http://rubymonk.com/&lt;br /&gt;
#http://www.ruby-lang.org/en/documentation/quickstart&lt;br /&gt;
#http://www.ruby-doc.org/downloads/&lt;br /&gt;
#http://pragprog.com/titles/ruby3/programming-ruby-1-9&lt;br /&gt;
#http://oreilly.com/catalog/9780596516178/&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=66464</id>
		<title>CSC/ECE 517 Fall 2012</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012&amp;diff=66464"/>
		<updated>2012-10-03T19:39:53Z</updated>

		<summary type="html">&lt;p&gt;Schand10: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;*[[CSC/ECE 517 Fall 2012/ch1 n xx]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w1 rk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w20 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w5 su]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w6 pp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w4 aj]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w7 am]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w8 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w9 av]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w10 pk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w11 ap]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w12 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w14 gv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w17 ir]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w18 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w22 an]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 aa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w21 wi]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w31 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w16 br]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1a 1w23 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w24 nr]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w15 rt]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w3 pl]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w32 cm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w67 ks]]&lt;br /&gt;
&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w27 ms]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w29 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w33 op]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w19 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w34 vd]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w35 sa]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1 1w30 rp]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w47 sk]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w69 mv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w44 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w45 is]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w53 kc]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 ar]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w39 sn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w54 go]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w56 ms]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w64 nn]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w66 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w40 as]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w42 js]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w46 sm]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w71 gs]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w63 dv]]&lt;br /&gt;
*[[CSC/ECE 517 Fall 2012/ch1b 1w55 ms]]&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=User:Schand10&amp;diff=66463</id>
		<title>User:Schand10</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=User:Schand10&amp;diff=66463"/>
		<updated>2012-10-03T19:32:09Z</updated>

		<summary type="html">&lt;p&gt;Schand10: Created page with &amp;quot;This is a sample page&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a sample page&lt;/div&gt;</summary>
		<author><name>Schand10</name></author>
	</entry>
</feed>