Class: Integer

Inherits:
Object
  • Object
show all
Defined in:
lib/ubsafe/extensions/ubsafe_integer_extensions.rb

Instance Method Summary collapse

Instance Method Details

#daysObject Also known as: day



21
22
23
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 21

def days
  return self.hours * 24
end

#hoursObject Also known as: hour



15
16
17
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 15

def hours
  return self.mins * 60
end

#minsObject Also known as: min



9
10
11
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 9

def mins
  return self.to_i * 60
end

#monthsObject Also known as: month



33
34
35
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 33

def months
  return self.days * 30
end

#secondsObject Also known as: second



3
4
5
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 3

def seconds
  return self.to_i
end

#weeksObject Also known as: week



27
28
29
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 27

def weeks
  return self.days * 7
end

#yearsObject Also known as: year



39
40
41
# File 'lib/ubsafe/extensions/ubsafe_integer_extensions.rb', line 39

def years
  return self.days * 365
end