Module: Rack::Downtime::Utils

Defined in:
lib/rack/downtime/utils.rb

Class Method Summary collapse

Class Method Details

.parse_downtime(data) ⇒ Object



5
6
7
8
9
10
# File 'lib/rack/downtime/utils.rb', line 5

def parse_downtime(data)
  return unless data

  downtime = data.split("/", 2).map { |date| DateTime.iso8601(date) }
  downtime.empty? ? nil : downtime
end