Class: Hour::Unit Private
- Inherits:
-
Object
- Object
- Hour::Unit
- Defined in:
- lib/hour.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Abstract time unit class.
Subclasses are decorating the ‘Hour` class with functionality specific for their particular type (hours, minutes and seconds).
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(hour) ⇒ Unit
constructor
private
A new instance of Unit.
- #value ⇒ Object private
Constructor Details
#initialize(hour) ⇒ Unit
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Unit.
15 16 17 |
# File 'lib/hour.rb', line 15 def initialize(hour) @hour = hour end |
Instance Method Details
#value ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
11 12 13 |
# File 'lib/hour.rb', line 11 def value raise NotImplementedError.new("Override in subclasses.") end |