Rubocop: Avoid single-line method definitions

This commit is contained in:
Pat Hawks 2016-01-04 12:12:17 -08:00
parent c1c8b6dbf7
commit cce848d3d8
No known key found for this signature in database
GPG Key ID: F1746FF5F18B3D1B
1 changed files with 43 additions and 11 deletions

View File

@ -35,17 +35,49 @@ module Jekyll
category_set.to_a.join('/') category_set.to_a.join('/')
end end
def year; @obj.date.strftime("%Y"); end def year
def month; @obj.date.strftime("%m"); end @obj.date.strftime("%Y")
def day; @obj.date.strftime("%d"); end end
def hour; @obj.date.strftime("%H"); end
def minute; @obj.date.strftime("%M"); end def month
def second; @obj.date.strftime("%S"); end @obj.date.strftime("%m")
def i_day; @obj.date.strftime("%-d"); end end
def i_month; @obj.date.strftime("%-m"); end
def short_month; @obj.date.strftime("%b"); end def day
def short_year; @obj.date.strftime("%y"); end @obj.date.strftime("%d")
def y_day; @obj.date.strftime("%j"); end 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 end
end end