Hi Jordon,

Thanks for your information and I agree on wat your saying.

Thanks,
Senthil Srinivasan

On Wednesday, 28 November 2012 19:32:01 UTC+5:30, Jordon Bedwell wrote:
>
> On Wed, Nov 28, 2012 at 6:46 AM, thil <[email protected] <javascript:>> 
> wrote: 
> > Self.methods is static methods using the class name itself you can call 
> the 
> > methods and is not available to the instance of the class. 
>
> There is no such thing as static methods in Ruby.  self.method_name 
> (or sometimes self.class.method_name) are instance methods on the 
> singleton instance of the object (in 1.9 you can access the singleton 
> via singleton_class too).  Since everything is an object in Ruby 
> (literally) you have multiple types of instances, in his case he is 
> accessing instance methods on the singleton (or anonymous class or 
> eigen, however you want to label it) vs instance methods on /an/ 
> instance of that object. 
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msg/rubyonrails-talk/-/3b1rrqgtyPYJ.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to