lib/timeliness/helpers.rb in timeliness-0.2.0 vs lib/timeliness/helpers.rb in timeliness-0.3.0
- old
+ new
@@ -3,10 +3,10 @@
def full_hour(hour, meridian)
hour = hour.to_i
return hour if meridian.nil?
if meridian.delete('.').downcase == 'am'
- raise if hour == 0 || hour > 12
+ raise(ArgumentError) if hour == 0 || hour > 12
hour == 12 ? 0 : hour
else
hour == 12 ? hour : hour + 12
end
end