Sha256: 880b7c829590f8436fc33ee82fc199c42b5c70dfb959bd523c4d1187d64fba17

Contents?: true

Size: 355 Bytes

Versions: 2

Compression:

Stored size: 355 Bytes

Contents

module GemCodebreakerAmidasd
  class Statistic
    attr_reader :user, :game, :date
    def initialize(user:, game:)
      @user = user
      @game = game
      @date = DateTime.now
    end

    def self.sort_array(array)
      array.sort_by! { |value| [value.game.total_count_attempt, value.game.count_attempt, value.game.count_hints] }
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
gem_codebreaker_amidasd-0.2.0 lib/gem_codebreaker_amidasd/statistic.rb
gem_codebreaker_amidasd-0.1.9 lib/gem_codebreaker_amidasd/statistic.rb