Class: CodeforcesAPI::Object::ProblemStatistics

Inherits:
Object
  • Object
show all
Defined in:
lib/codeforces_api/object/problem_statistics.rb

Constant Summary collapse

ATTRS =
[
  :contestId,
  :index,
  :solvedCount,
].freeze

Instance Method Summary collapse

Constructor Details

#initialize(probstat) ⇒ ProblemStatistics

Returns a new instance of ProblemStatistics.



12
13
14
# File 'lib/codeforces_api/object/problem_statistics.rb', line 12

def initialize probstat
  ATTRS.each { |attr| instance_variable_set("@#{attr}", probstat[attr.to_s]) }
end