class Tempo::EndTimeError
Raise when the end time is less than the start time start_time and end_time should be Time
objects
Public Class Methods
new(start_time, end_time)
click to toggle source
# File lib/tempo/exceptions.rb, line 48 def initialize(start_time, end_time) @start_time = (start_time.kind_of? Time) ? start_time.strftime('%H:%M') : start_time.to_s @end_time = (end_time.kind_of? Time) ? end_time.strftime('%H:%M') : end_time.to_s @on_day = (start_time.kind_of? Time) ? "on #{start_time.strftime('%b %d, %Y')}" : "" @message = "End time #{@end_time} must be greater than start time #{@start_time} #{@on_day}" end
Public Instance Methods
to_s()
click to toggle source
# File lib/tempo/exceptions.rb, line 56 def to_s @message end