Method: Artic::TimeRange#initialize

Defined in:
lib/artic/time_range.rb

#initialize(min, max) ⇒ TimeRange

Initializes a new range.

Parameters:

  • min (String)

    the start time (in HH:MM format)

  • max (String)

    the end time (in HH:MM format)

Raises:

  • (ArgumentError)

    if the start time or the end time is invalid

  • (ArgumentError)

    if the start time is after the end time



28
29
30
31
# File 'lib/artic/time_range.rb', line 28

def initialize(min, max)
  super
  validate_range
end