Hi, I am a bit confused. Can someone explain the difference between instance variables and regular instance variables? Thanks a lot. Regards, Ianne -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Ianne Leson wrote:> Hi, > > I am a bit confused. Can someone explain the difference between > instance variables and regular instance variables? Thanks a lot. > > Regards, > Iannesupplementary: regular instance variables = @var instance variables = var is this correct? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
On 29 Sep 2006, at 09:53, Ianne Leson wrote:> Ianne Leson wrote: >> >> I am a bit confused. Can someone explain the difference between >> instance variables and regular instance variables? Thanks a lot. > > supplementary: > > regular instance variables = @var > instance variables = var > > is this correct?This is the first I have heard of a "regular instance variable". There is one reference in Pickaxe, which is in the description for instance_variable_get. I think it is used there with the sense of "plain, vanilla, ordinary, 2 bit instance variable". So: @var = instance variable var = local variable Local variables are transient, and only relevant within a particular scope, which is within the defining classes methods. Paul --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---