lib/fitbit_api/helpers/utils.rb in fitbit_api-0.12.0 vs lib/fitbit_api/helpers/utils.rb in fitbit_api-0.12.1
- old
+ new
@@ -1,8 +1,7 @@
module FitbitAPI
class Client
-
PERIODS = %w(1d 7d 30d 1w 1m 3m 6m 1y max).freeze
def format_date(date)
if [Date, Time, DateTime].include?(date.class)
date.strftime('%Y-%m-%d')
@@ -77,8 +76,7 @@
return string if string.match(/[A-Z]|[a-z]([A-Z0-9]*[a-z][a-z0-9]*[A-Z]|[a-z0-9]*[A-Z][A-Z0-9]*[a-z])[A-Za-z0-9]*/)
string = word.to_s.split('_').collect(&:capitalize).join
string.gsub!(/^\w{1}/) { |word| word.downcase } if opts[:lower]
return string
end
-
end
end