Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def test(list)
- print "Not valid" unless list.all? { |x| x[1] == ("R"||"S") }
- end
- list = [ [ "Apple", "R" ], [ "Banana", "S" ] ]
- test(list)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement