# File lib/crono/interval.rb, line 6 def self.parse(value) from_to = case value when Array then value when Hash then value.values_at(:from, :to) when String then value.split('-') else fail "Unknown interval format: #{value.inspect}" end from, to = from_to.map { |v| TimeOfDay.parse(v) } new from, to end