Sha256: affc894d6cb79ae75d1f661f51af7eeb3bc8a88e989a3b3df27ea5f71a4f4280

Contents?: true

Size: 393 Bytes

Versions: 11

Compression:

Stored size: 393 Bytes

Contents

class Numeric

  def percent
    self / 100.0
  end

  def seconds
    self
  end
  alias :second :seconds

  def minutes
    self * 60
  end
  alias :minute :minutes

  def hours
    self * 3600
  end
  alias :hour :hours

  def later(user_info=nil, &fire)
    NSTimer.scheduledTimerWithTimeInterval(self.to_f, target: fire, selector: 'call:', userInfo: user_info, repeats: false)
  end

end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
sugarcube-0.7 lib/sugarcube/numeric.rb
sugarcube-0.6.1 lib/sugarcube/numeric.rb
sugarcube-0.6 lib/sugarcube/numeric.rb
sugarcube-0.5 lib/sugarcube/numeric.rb
sugarcube-0.4.2 lib/sugarcube/numeric.rb
sugarcube-0.4.1 lib/sugarcube/numeric.rb
sugarcube-0.4 lib/sugarcube/numeric.rb
sugarcube-0.3.2 lib/sugarcube/numeric.rb
sugarcube-0.3.1 lib/sugarcube/numeric.rb
sugarcube-0.3.0 lib/sugarcube/numeric.rb
sugarcube-0.2.5 lib/sugarcube/numeric.rb