Colin Law wrote: > Yes of course, I am still getting the hang of ruby. I think my comments > still apply, though not quite as strongly. I suppose if I wrap it in a > class method I can probably live with my conscience.
Not necessarily. I see nothing wrong with using class variables. In Java they are used all the time and are called "Fields" otherwise known as static variable. Java actually doesn't have actual constants. A "constant" in Java would be a static final variable. Declaring it static makes it a variable on the class and final makes it immutable (unable to change once initialized). I think you're still confusing class variable and globals. Globals break encapsulation, class variables do not. -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

