Answer the question
In order to leave comments, you need to log in
Why doesn't plain Ruby code work?
Started reading Ruby book, first listing if gives error "undefined method `saturday' for Sat Aug 30 19:23:32 +0300 2014:Time (NoMethodError)" code below
today = Time.now
if today.monday?
puts "123"
elsif today.sunday?
puts "relax"
else
puts "Go work"
end
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question