Class: Cronin::Hour

Inherits:
Object
  • Object
show all
Defined in:
lib/cronin/hour.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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

#hourObject (readonly)

Returns the value of attribute hour.



4
5
6
# File 'lib/cronin/hour.rb', line 4

def hour
  @hour
end

#minuteObject (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