Sha256: 96246e97ca7e4017fbbf4071a96a80a80fa93e26c53d80df603ff9ef5fb20fbc

Contents?: true

Size: 777 Bytes

Versions: 8

Compression:

Stored size: 777 Bytes

Contents

# Public: An object representing category statistics for a player within a
# single Trivia Crack game.
module TriviaCrack
  class CategoryStatistics

    # Public: The category for these statistics (:arts, :geography, etc).
    attr_reader :category

    # Public: The number of questions answered correctly for this category.
    attr_reader :correct

    # Public: The number of questions answered incorrectly for this category.
    attr_reader :incorrect

    # Public: Boolean indicating whether this is the worst category for the
    # player.
    attr_reader :worst

    def initialize(category: nil, correct: nil, incorrect: nil, worst: nil)
      @category  = category
      @correct   = correct
      @incorrect = incorrect
      @worst     = worst
    end

  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
triviacrack-0.6.0 lib/triviacrack/category_statistics.rb
triviacrack-0.5.1 lib/triviacrack/category_statistics.rb
triviacrack-0.5.0 lib/triviacrack/category_statistics.rb
triviacrack-0.4.0 lib/triviacrack/category_statistics.rb
triviacrack-0.3.2 lib/triviacrack/category_statistics.rb
triviacrack-0.3.0 lib/triviacrack/category_statistics.rb
triviacrack-0.2.0 lib/triviacrack/category_statistics.rb
triviacrack-0.1.0 lib/triviacrack/category_statistics.rb