From cce848d3d81b1b6a992911289bf634bb9abffdea Mon Sep 17 00:00:00 2001 From: Pat Hawks Date: Mon, 4 Jan 2016 12:12:17 -0800 Subject: [PATCH] Rubocop: Avoid single-line method definitions --- lib/jekyll/drops/url_drop.rb | 54 ++++++++++++++++++++++++++++-------- 1 file changed, 43 insertions(+), 11 deletions(-) diff --git a/lib/jekyll/drops/url_drop.rb b/lib/jekyll/drops/url_drop.rb index 32aae194..2815edf7 100644 --- a/lib/jekyll/drops/url_drop.rb +++ b/lib/jekyll/drops/url_drop.rb @@ -35,17 +35,49 @@ module Jekyll category_set.to_a.join('/') end - def year; @obj.date.strftime("%Y"); end - def month; @obj.date.strftime("%m"); end - def day; @obj.date.strftime("%d"); end - def hour; @obj.date.strftime("%H"); end - def minute; @obj.date.strftime("%M"); end - def second; @obj.date.strftime("%S"); end - def i_day; @obj.date.strftime("%-d"); end - def i_month; @obj.date.strftime("%-m"); end - def short_month; @obj.date.strftime("%b"); end - def short_year; @obj.date.strftime("%y"); end - def y_day; @obj.date.strftime("%j"); end + def year + @obj.date.strftime("%Y") + end + + def month + @obj.date.strftime("%m") + end + + def day + @obj.date.strftime("%d") + end + + def hour + @obj.date.strftime("%H") + end + + def minute + @obj.date.strftime("%M") + end + + def second + @obj.date.strftime("%S") + end + + def i_day + @obj.date.strftime("%-d") + end + + def i_month + @obj.date.strftime("%-m") + end + + def short_month + @obj.date.strftime("%b") + end + + def short_year + @obj.date.strftime("%y") + end + + def y_day + @obj.date.strftime("%j") + end end end end