The class syntax can also be used as an expression which can be assigned to a variable or explicitly returned.
MoonScript:
x = class Bucket drops: 0 add_drop: => @drops += 1