Articles related to ruby methods
Methods - Ruby - About.com
Methods are very important in Ruby. You have probably used them before, but have you thought about how to really define them?
References to Methods in Ruby - About.com
While it may not make sense to do so at first, it is possible to take a reference to a method in Ruby.
More About Methods - Ruby - About.com
Surprisingly (because Ruby is usually so progressive in these respects), Ruby methods are not first class objects. They exist in a kind of limbo. They can be ...
Dynamic Method Calls - Ruby - About.com
If you're coming from a compiled language, it's easy to think that method calls are like native function calls. This is simply not the case in Ruby.
Aliasing a Method in Ruby - About.com
To alias a method or variable name in Ruby is to create a second name for the method or variable. Aliasing can be used either to provide more expressive ...
Instantiation and the Initialize Method - Ruby - About.com
Ruby objects are instantiated using the Class.new method, and initialize using their own initialize methods.
Method Visibility - Ruby - About.com
Method visibility is crucial to implement proper encapsulation. Ruby provides ways to not only hide instance variables, but to hide instance methods as well.
Optional Method Parameters with Hashes - Ruby - About.com
Ruby provides a mechanism for optional method parameters. However, this mechanism is not very flexible. Take look at the following example. #!/usr/bin/env ...
Using Attributes With Ruby - About.com
There are two basic things you can do with an object: call a method on it and access an attribute. Ruby doesn't make a distinction between these things, but it ...
Method for Mapping the Values of an Array - Ruby - About.com
Iterating over arrays isn't the only trick up Ruby's sleeve. ... Yet again, the map method doesn't really belong to the Array class, it belongs to the Enumerable ...