class Magic8Ball

lib/magic_8_ball.rb

Constants

NEGATIVE
NEUTRAL
POSITIVE

Public Class Methods

answer() click to toggle source
# File lib/magic_8_ball.rb, line 23
def self.answer
  (POSITIVE + NEGATIVE + NEUTRAL).sample
end
negative_answer() click to toggle source
# File lib/magic_8_ball.rb, line 15
def self.negative_answer
  NEGATIVE.sample
end
neutral_answer() click to toggle source
# File lib/magic_8_ball.rb, line 19
def self.neutral_answer
  NEUTRAL.sample
end
positive_answer() click to toggle source
# File lib/magic_8_ball.rb, line 11
def self.positive_answer
  POSITIVE.sample
end