codebreaker-mikhail 0.2.3 → 0.2.4

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: 4f6a028f980dc8e61d6053ce080a5ca11309cc8eaa662008c25a4716a75d2e46
4
- data.tar.gz: c0e4f3c5df0f2eeadcf828b70707b523edfcf6f2d54b561d0bd1519af759c2e2
3
+ metadata.gz: 9b8c262060ae8e1c5e2fa1b7552b3b44eafcada986101bdd76766b469bc44c21
4
+ data.tar.gz: 1d8b9b85537481efe77e410611589f2d0633812d3a672af0853d801f2765e44e
5
5
  SHA512:
6
- metadata.gz: 57999940def2c3da5a7a049cb9008feb6d8f708849e103303b72473a55688e0d6133b5d76d94efa8b10e34b8a23245eb2f39fb2e8552d33a27701837040c6bad
7
- data.tar.gz: 20ef1b94598ccc2d16ebc2f85b5a4008beb1dfaefc3790444733cdcf9925e529b4b5cea18097ba209fdcbd4fd75a2f7b44293a3b67a27a1cdd1078530bf2bc95
6
+ metadata.gz: 85c68e7a941ee7d349b2517b6eca501c480a56e6df5cf39bcd86bff7e1b9a2cca7bfc75bcd0212236eec0cd2f2f3131bdc9c106c5a9acc61399020d58be18692
7
+ data.tar.gz: d003e375c385291218b41b59c2d9feddefde285d01304590b131dbde7ecd99c02e2f71eb926e21bea731e9c3747d1a5f209ff4461e6f9e9a0483a5499b1c8551
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- codebreaker-mikhail (0.2.3)
4
+ codebreaker-mikhail (0.2.4)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -11,4 +11,3 @@ require_relative "code_generator"
11
11
  require_relative "user"
12
12
  require_relative "file_store"
13
13
  require_relative "game"
14
- require_relative "statistics"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Codebreaker
4
- VERSION = "0.2.3"
4
+ VERSION = "0.2.4"
5
5
  end
data/lib/codebreaker.rb CHANGED
@@ -3,5 +3,13 @@
3
3
  require_relative "codebreaker/autoloader"
4
4
 
5
5
  module Codebreaker
6
+ class Statistics
7
+ include FileStore
8
+
9
+ def show
10
+ load_file&.each&.sort_by { |game| [game[:available_attempts], game[:used_hints], game[:used_attempts]] }
11
+ end
12
+ end
13
+
6
14
  class Error < StandardError; end
7
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codebreaker-mikhail
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mikhail Bogun