class CodebreakerRostik::Difficulty

Constants

DIFFICULTIES

Public Class Methods

new(difficulty) click to toggle source
# File lib/difficulty.rb, line 21
def initialize(difficulty)
  @difficulty = difficulty.downcase.to_sym if difficulty
end

Public Instance Methods

choose_difficulty() click to toggle source
# File lib/difficulty.rb, line 25
def choose_difficulty
  return DIFFICULTIES[@difficulty] if DIFFICULTIES.key?(@difficulty)
end