Sha256: 8d3125e0f6c8eb6848282af79fecfef1678b5e7c841bed6639318afb9a29f4f5
Contents?: true
Size: 485 Bytes
Versions: 1
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true require_relative 'autoload' require_relative 'settings' class User attr_reader :name, :difficulty, :attempts, :hints def initialize(name, difficulty) Validations.validate_name(name) Validations.validate_difficulty(difficulty) @name = name @difficulty = Settings::DIFFICULTY[difficulty] @attempts = { all: @difficulty[:attempts], used: 0 } @hints = { all: @difficulty[:hints], used: 0 } end end User.new('kirill', 'hell')
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
codebreaker_kirill-0.2.19 | lib/codebreaker_kirill/user.rb |