Class: Cronin::Hour
- Inherits:
-
Object
- Object
- Cronin::Hour
- Defined in:
- lib/cronin/hour.rb
Instance Attribute Summary collapse
-
#hour ⇒ Object
readonly
Returns the value of attribute hour.
-
#minute ⇒ Object
readonly
Returns the value of attribute minute.
Instance Method Summary collapse
- #==(other) ⇒ Object
-
#initialize(hour, minute) ⇒ Hour
constructor
A new instance of Hour.
Constructor Details
#initialize(hour, minute) ⇒ Hour
Returns a new instance of Hour.
5 6 7 8 |
# File 'lib/cronin/hour.rb', line 5 def initialize(hour,minute) @hour = hour @minute = minute end |
Instance Attribute Details
#hour ⇒ Object (readonly)
Returns the value of attribute hour.
4 5 6 |
# File 'lib/cronin/hour.rb', line 4 def hour @hour end |
#minute ⇒ Object (readonly)
Returns the value of attribute minute.
4 5 6 |
# File 'lib/cronin/hour.rb', line 4 def minute @minute end |
Instance Method Details
#==(other) ⇒ Object
10 11 12 |
# File 'lib/cronin/hour.rb', line 10 def ==(other) other.hour == self.hour && other.minute == self.minute end |