Class: Hour::MinuteUnit
Instance Method Summary
collapse
Methods inherited from Unit
#initialize
Constructor Details
This class inherits a constructor from Hour::Unit
Instance Method Details
#round ⇒ Object
35
36
37
|
# File 'lib/hour.rb', line 35
def round
self.value + ((0..29).include?(@hour.s) ? 0 : 1)
end
|
#round_total ⇒ Object
43
44
45
|
# File 'lib/hour.rb', line 43
def round_total
self.total + ((0..29).include?(@hour.s) ? 0 : 1)
end
|
#total ⇒ Object
39
40
41
|
# File 'lib/hour.rb', line 39
def total
@hour.h * 60 + self.value
end
|
#value ⇒ Object
31
32
33
|
# File 'lib/hour.rb', line 31
def value
@hour.m
end
|