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).



29
30
31
# File 'lib/god/sugar.rb', line 29

def days
  self * 86400
end

#gigabytesObject Also known as: gigabyte

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



53
54
55
# File 'lib/god/sugar.rb', line 53

def gigabytes
  self * (1024**2)
end

#hoursObject Also known as: hour

Public: Units of hours (3600 seconds).



21
22
23
# File 'lib/god/sugar.rb', line 21

def hours
  self * 3600
end

#kilobytesObject Also known as: kilobyte

Units of kilobytes.



37
38
39
# File 'lib/god/sugar.rb', line 37

def kilobytes
  self
end

#megabytesObject Also known as: megabyte

Units of megabytes (1024 kilobytes).



45
46
47
# File 'lib/god/sugar.rb', line 45

def megabytes
  self * 1024
end

#minutesObject Also known as: minute

Public: Units of minutes (60 seconds).



13
14
15
# File 'lib/god/sugar.rb', line 13

def minutes
  self * 60
end

#percentObject

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



61
62
63
# File 'lib/god/sugar.rb', line 61

def percent
  self
end

#secondsObject Also known as: second

Public: Units of seconds.



5
6
7
# File 'lib/god/sugar.rb', line 5

def seconds
  self
end