codebreaker_kirill 1.0.0 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 03bddb3432e90811fc0b774863524cc77b31d8d6ef333f40294a823558d7f952
4
- data.tar.gz: 5e5c9fe328e24f3418ae00f06a1a533f95ce103557f302e291dfbc4782a107fb
3
+ metadata.gz: d6329eb1e53ca286953697590e45bbacac554c3fc42c65558f56123ddf00b70d
4
+ data.tar.gz: 4d9789da37d7c34db92a853f19cb4d17e666e6257e838913bf2340f27573f965
5
5
  SHA512:
6
- metadata.gz: e70b37a7b95ceca8e465524bda082bb6def70b9292ff7caced08acc62e91449abf52ea97e60101ac100121a01a5c68d505c0a1ac26ca1dda035287bd2405b820
7
- data.tar.gz: 1649b7b0235f9a90e860ba341d0db3eb0f6b5fe35a7d98ad9352a49b0e2fb68c246e7b61623bc56408bca7e16d015b10ba0444898b52e1bffd3a17ceac43acb3
6
+ metadata.gz: b45dc27721b3bd18ba5fa6c45518c9364779a72b296f5c8679d066789f952e5f9a35026366f75c79b3dbdf473936fc395af3daa2bb349f499f40f3a34457fcc3
7
+ data.tar.gz: f1f1d2bcfcb52edc993971764f3ac2fe1b2b6b8c6822bc6a8effd32507df65fbb46ef90a3a058042a48c21b40c314229edfe62e0ca98d04d327a2ec166c4737a
@@ -6,7 +6,11 @@ class User
6
6
  attr_reader :name, :difficulty, :attempts, :hints
7
7
 
8
8
  def initialize(name, difficulty)
9
- validation(name, difficulty)
9
+ begin
10
+ validation(name, difficulty)
11
+ rescue StandardError => e
12
+ puts e.message
13
+ end
10
14
  @name = name
11
15
  @difficulty = Settings::DIFFICULTY[difficulty]
12
16
  @attempts = { all: @difficulty[:attempts], used: 0 }
@@ -16,8 +20,5 @@ class User
16
20
  def validation(name, difficulty)
17
21
  Validations.validate_name(name)
18
22
  Validations.validate_difficulty(difficulty)
19
- rescue StandardError => e
20
- puts e.message
21
- nil
22
23
  end
23
24
  end
@@ -3,5 +3,5 @@
3
3
  require_relative 'game'
4
4
 
5
5
  module CodebreakerKirill
6
- VERSION = '1.0.0'
6
+ VERSION = '1.0.1'
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker_kirill
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kirill Dudchenko