7H3LaughingMan wrote:
> http://pastie.org/691288
> 
> I did some fine tuning and came up with a rather interesting way of
> keeping all of it to one class to represent the money. This is an
> example of one of the sets, the others look like this with a few
> changes. At the moment if it tries to be set to something below 0 it
> will take it from itself and if necessary work it's way up first and
> then down. I haven't been able to test this yet but I would love it if
> you could take a look at it and see if there might be a way to cut it
> down some more (The original was hideous!)

So is what you've just posted -- it's repetitive and unreadable. 
There's no point in keeping it all in one class if the code quality 
suffers.

> 
> Hopefully if I keep it to this one class then I could finally take a
> step forward and continue adding more and more to the database.

The two have nothing to do with each other.  Don't be afraid to 
introduce classes if it makes life simpler.

Best,
--
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to