Sha256: 349b7ffb04a4083561afd7ec2117811d650564592c502c5cf5c0f3c7aaa748be
Contents?: true
Size: 759 Bytes
Versions: 36
Compression:
Stored size: 759 Bytes
Contents
class Numeric 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
36 entries across 36 versions & 1 rubygems