Class: Hour::MinuteUnit

Inherits:
Unit
  • Object
show all
Defined in:
lib/hour.rb

Instance Method Summary collapse

Methods inherited from Unit

#initialize

Constructor Details

This class inherits a constructor from Hour::Unit

Instance Method Details

#roundObject



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

def round
  self.value + ((0..29).include?(@hour.s) ? 0 : 1)
end

#round_totalObject



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

def round_total
  self.total + ((0..29).include?(@hour.s) ? 0 : 1)
end

#totalObject



39
40
41
# File 'lib/hour.rb', line 39

def total
  @hour.h * 60 + self.value
end

#valueObject



31
32
33
# File 'lib/hour.rb', line 31

def value
  @hour.m
end