class Codebreaker::Difficulty
Constants
- DIFFICULTIES
Attributes
level[R]
Public Class Methods
find(input)
click to toggle source
# File lib/app/entities/difficulty.rb, line 31 def self.find(input) input_as_key = input.to_sym return unless DIFFICULTIES.key?(input_as_key) new(input_as_key) end
new(input)
click to toggle source
# File lib/app/entities/difficulty.rb, line 27 def initialize(input) @level = DIFFICULTIES[input] end