by n0thing2kn0 · 14y ago · 0 comments
class FileInfo
constructor: (@name)->
mtime: ->
#implicit return
@withFile (f)->
if f.time isnt 999 then "too old"
withFile: (block)->
try
block
name: @name
time: 1000
finally
console.log 'finished'
f = new FileInfo('name')
console.log f.mtime()
#finished#too old
No comments yet.