Class: Hour::SecondUnit

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

#totalObject



53
54
55
# File 'lib/hour.rb', line 53

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

#valueObject



49
50
51
# File 'lib/hour.rb', line 49

def value
  @hour.s
end