class Subconv::Utility::Timespan
Attributes
end_time[R]
start_time[R]
Public Class Methods
new(start_time, end_time)
click to toggle source
# File lib/subconv/utility.rb, line 8 def initialize(start_time, end_time) @start_time = start_time @end_time = end_time fail InvalidTimespanError, 'Timespan end time is before start time' if @end_time < @start_time fail InvalidTimespanError, 'Timespan is empty' if @start_time == @end_time end
Public Instance Methods
==(other)
click to toggle source
# File lib/subconv/utility.rb, line 15 def ==(other) self.class == other.class && @start_time == other.start_time && @end_time == other.end_time end