Class: Hour::HourUnit
Instance Method Summary collapse
Methods inherited from Unit
Constructor Details
This class inherits a constructor from Hour::Unit
Instance Method Details
#round ⇒ Object
25 26 27 |
# File 'lib/hour.rb', line 25 def round self.value + ((0..29).include?(@hour.m) ? 0 : 1) end |
#value ⇒ Object
21 22 23 |
# File 'lib/hour.rb', line 21 def value @hour.h end |