Wednesday, August 8, 2007

p62
Class methods and class constants:
class SongList
MAX_TIME = 5*60 # 5 minutes

def SongList.is_too_long(song)
return song.duration > MAX_TIME
end
end
Singleton syntax
Multiple ways of declaring class methods

Allusions to a singleton mixin for thread-safe singleton


No comments: