Displaying 2 results from an estimated 2 matches for "ruby_program".
2012 Oct 04
0
protected method access
I just want to make a note of something I read here:
http://en.wikibooks.org/wiki/Ruby_Programming/Syntax/Classes#Protected
def <=>(other)
self.age <=> other.age
end
It says:
"If age is private, this method will not work, because other.age is
not accessible. If "age" is protected, this will work fine, because
self and other are of same class, and can acces...
2011 Sep 29
2
constant variable
How to make a variable constant in ruby so that the value remains
fixed throughout and cannot be altered at any cost
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to