How to restrict the number of objects of a class to a given number in ruby?

Posted by Hitesh Manchanda on Stack Overflow See other posts from Stack Overflow or by Hitesh Manchanda
Published on 2010-04-03T18:59:21Z Indexed on 2010/04/03 19:03 UTC
Read the original article Hit count: 328

Filed under:
|
|
|

how can i extend the singleton pattern to a number of objects for a class i.e. how can i have only 5 objects of a class at max and not more than that in ruby

© Stack Overflow or respective owner

Related posts about ruby

Related posts about singleton