Class: CodeforcesAPI::Object::Problem
- Inherits:
-
Object
- Object
- CodeforcesAPI::Object::Problem
- Defined in:
- lib/codeforces_api/object/problem.rb
Constant Summary collapse
- ATTRS =
[ :contestId, :index, :name, :type, :points, :tags, ].freeze
Instance Method Summary collapse
-
#initialize(prob) ⇒ Problem
constructor
A new instance of Problem.
Constructor Details
#initialize(prob) ⇒ Problem
Returns a new instance of Problem.
15 16 17 |
# File 'lib/codeforces_api/object/problem.rb', line 15 def initialize prob ATTRS.each { |attr| instance_variable_set("@#{attr}", prob[attr.to_s]) } end |