Class methods and class constants:
class SongListSingleton syntax
MAX_TIME = 5*60 # 5 minutes
def SongList.is_too_long(song)
return song.duration > MAX_TIME
end
end
Multiple ways of declaring class methods
Allusions to a singleton mixin for thread-safe singleton
No comments:
Post a Comment