Class: Hour::HourUnit

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



25
26
27
# File 'lib/hour.rb', line 25

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

#valueObject



21
22
23
# File 'lib/hour.rb', line 21

def value
  @hour.h
end