class Colors
Attributes
answer[R]
Public Class Methods
new()
click to toggle source
# File lib/colors.rb, line 3 def initialize @answer = %w(r r r r) end
Public Instance Methods
answer_options()
click to toggle source
# File lib/colors.rb, line 15 def answer_options %w(r g b y) end
secret_answer()
click to toggle source
# File lib/colors.rb, line 7 def secret_answer @answer = [] 4.times do answer << shuffle.pop end answer end
shuffle()
click to toggle source
# File lib/colors.rb, line 19 def shuffle answer_options.shuffle end