Class: Numeric

Inherits:
Object
  • Object
show all
Defined in:
lib/god/sugar.rb

Instance Method Summary collapse

Instance Method Details

#daysObject Also known as: day

Public: Units of days (86400 seconds).



27
28
29
# File 'lib/god/sugar.rb', line 27

def days
  self * 86400
end

#gigabytesObject Also known as: gigabyte

Units of gigabytes (1,048,576 kilobytes).



51
52
53
# File 'lib/god/sugar.rb', line 51

def gigabytes
  self * (1024 ** 2)
end

#hoursObject Also known as: hour

Public: Units of hours (3600 seconds).



19
20
21
# File 'lib/god/sugar.rb', line 19

def hours
  self * 3600
end

#kilobytesObject Also known as: kilobyte

Units of kilobytes.



35
36
37
# File 'lib/god/sugar.rb', line 35

def kilobytes
  self
end

#megabytesObject Also known as: megabyte

Units of megabytes (1024 kilobytes).



43
44
45
# File 'lib/god/sugar.rb', line 43

def megabytes
  self * 1024
end

#minutesObject Also known as: minute

Public: Units of minutes (60 seconds).



11
12
13
# File 'lib/god/sugar.rb', line 11

def minutes
  self * 60
end

#percentObject

Units of percent. e.g. 50.percent.



59
60
61
# File 'lib/god/sugar.rb', line 59

def percent
  self
end

#secondsObject Also known as: second

Public: Units of seconds.



3
4
5
# File 'lib/god/sugar.rb', line 3

def seconds
  self
end