[Rails] Re: very basic question - writing instance method

2009-03-16 Thread athem
In object-oriented programming and your example, @obj1 is not being passed to perform_sanity_check, it is the receiver object, the object being asked to execute its perform_sanity_check method. In a way, you are sending a message to the object @obj, requesting that it execute one of its methods.

[Rails] Re: very basic question - writing instance method

2009-03-16 Thread athem
In object-oriented programming and your example, @obj1 is not being passed to perform_sanity_check, it is the receiver object, the object being asked to execute its perform_sanity_check method. In a way, you are sending a message to the object @obj, requesting that it execute one of its methods.

[Rails] Re: very basic question - writing instance method

2009-03-15 Thread MaD
Will the instance method perform_sanity_check have access to @obj1 attributes? yes, with self.attribute --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups Ruby on Rails: Talk group. To post to this group, send

[Rails] Re: very basic question - writing instance method

2009-03-15 Thread Frederick Cheung
On Mar 15, 6:22 am, Amita Bhatkhande rails-mailing-l...@andreas- s.net wrote: If we are calling an instance method on particular instance of an object as: @obj1.perform_sanity_check(@obj2) Will the instance method perform_sanity_check have access to @obj1 attributes? Yes. Fred How do