class Numeric
Public Instance Methods
ago()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 79 def ago ::Time.now - self end
bytes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 83 def bytes self end
Also aliased as: byte
days()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 69 def days self * 86_400 end
Also aliased as: day
gigabytes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 98 def gigabytes self * 1024 * 1024 * 1024 end
Also aliased as: gigabyte
hours()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 64 def hours self * 3600 end
Also aliased as: hour
kilobytes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 88 def kilobytes self * 1024 end
Also aliased as: kilobyte
megabytes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 93 def megabytes self * 1024 * 1024 end
Also aliased as: megabyte
minutes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 59 def minutes self * 60 end
Also aliased as: minute
percents()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 49 def percents self end
Also aliased as: percent
seconds()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 54 def seconds self end
Also aliased as: second
terabytes()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 103 def terabytes self * 1024 * 1024 * 1024 * 1024 end
Also aliased as: terabyte
weeks()
click to toggle source
# File lib/eye/utils/mini_active_support.rb, line 74 def weeks self * 86_400 * 7 end
Also aliased as: week