Class: CodeforcesAPI::Object::RanklistRow
- Inherits:
-
Object
- Object
- CodeforcesAPI::Object::RanklistRow
- Defined in:
- lib/codeforces_api/object/ranklist_row.rb
Constant Summary collapse
- ATTRS =
[ :party, :rank, :points, :penalty, :successfulHackCount, :unsuccessfulHackCount, :problemResults, :lastSubmissionTimeSeconds, ].freeze
Instance Method Summary collapse
-
#initialize(ranklist_row) ⇒ RanklistRow
constructor
A new instance of RanklistRow.
Constructor Details
#initialize(ranklist_row) ⇒ RanklistRow
17 18 19 20 21 |
# File 'lib/codeforces_api/object/ranklist_row.rb', line 17 def initialize ranklist_row ATTRS.each { |attr| instance_variable_set("@#{attr}", ranklist_row[attr.to_s]) } @party = Party.new(@party) if @party @problemResults = @problemResults.map { |pr| ProblemResult.new(pr) } if @problemResults end |