Alphabetize existing helpers

This commit is contained in:
Scott Schneider 2015-03-04 09:15:04 -08:00
parent a50b9bae10
commit 4f880497b7

View file

@ -13,14 +13,14 @@ module Vmpooler
hostname hostname
end end
def validate_date_str(date_str)
/^\d{4}-\d{2}-\d{2}$/ === date_str
end
def mean(list) def mean(list)
s = list.map(&:to_f).reduce(:+).to_f s = list.map(&:to_f).reduce(:+).to_f
(s > 0 && list.length > 0) ? s / list.length.to_f : 0 (s > 0 && list.length > 0) ? s / list.length.to_f : 0
end end
def validate_date_str(date_str)
/^\d{4}-\d{2}-\d{2}$/ === date_str
end
end end
get "#{api_prefix}/status/?" do get "#{api_prefix}/status/?" do