Sha256: 16873655c18358123b046463945dd5922c040decf9fa694ddadd4fbaed76aac7
Contents?: true
Size: 760 Bytes
Versions: 56
Compression:
Stored size: 760 Bytes
Contents
class NSNumber def later(user_info=nil, &fire) NSTimer.scheduledTimerWithTimeInterval(self, target: fire, selector: 'call:', userInfo: user_info, repeats: false) end def every(user_info=nil, &fire) NSTimer.scheduledTimerWithTimeInterval(self, target: fire, selector: 'call:', userInfo: user_info, repeats: true) end end module SugarCube module Timer module_function def every(time, user_info=nil, &fire) time.every user_info, &fire end def after(time, user_info=nil, &fire) time.later user_info, &fire end end end class NSTimer def self.every(time, user_info=nil, &fire) time.every user_info, &fire end def self.after(time, user_info=nil, &fire) time.later user_info, &fire end end
Version data entries
56 entries across 56 versions & 1 rubygems