You are viewing a single comment's thread. Return to all comments →
# write your case control structure here
puts "It's a Hacker!"
puts "It's a Submission!"
puts "It's a TestCase!"
puts "It's a Contest!"
puts "It's an unknown model"
This works .. thx
This answer certainly works but the idea of turning a class into a string could lead to potential issues down the line and made me a bit uncomfortable.
This worked for me in case anyone is interested:
puts "It\'s a Hacker!"
puts "It\'s a Submission!"
puts "It\'s a TestCase!"
puts "It\'s a Contest!"
puts "It\'s an unknown model"
I did this same thing, yet I am not passing both Test Cases.
Hey @ChristianVelez, will you please elaborate how turning a class name into a string could lead to potential issues ?
obj.class.to_s means....what is to_s
can you explain, why that code its work ?
it worked for me thanks