From 4f880497b7b927973a525b38300a0a9dbc82fc45 Mon Sep 17 00:00:00 2001 From: Scott Schneider Date: Wed, 4 Mar 2015 09:15:04 -0800 Subject: [PATCH] Alphabetize existing helpers --- lib/vmpooler/api/v1.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/vmpooler/api/v1.rb b/lib/vmpooler/api/v1.rb index f47ed9c..3bb91cd 100644 --- a/lib/vmpooler/api/v1.rb +++ b/lib/vmpooler/api/v1.rb @@ -13,14 +13,14 @@ module Vmpooler hostname end - def validate_date_str(date_str) - /^\d{4}-\d{2}-\d{2}$/ === date_str - end - def mean(list) s = list.map(&:to_f).reduce(:+).to_f (s > 0 && list.length > 0) ? s / list.length.to_f : 0 end + + def validate_date_str(date_str) + /^\d{4}-\d{2}-\d{2}$/ === date_str + end end get "#{api_prefix}/status/?" do