Class: CodeforcesAPI::Object::Party
- Inherits:
-
Object
- Object
- CodeforcesAPI::Object::Party
- Defined in:
- lib/codeforces_api/object/party.rb
Constant Summary collapse
- ATTRS =
[ :contestId, :members, :participantType, :teamId, :teamName, :ghost, :room, :startTimeSeconds, ].freeze
Instance Method Summary collapse
-
#initialize(party) ⇒ Party
constructor
A new instance of Party.
Constructor Details
#initialize(party) ⇒ Party
Returns a new instance of Party.
17 18 19 20 |
# File 'lib/codeforces_api/object/party.rb', line 17 def initialize party ATTRS.each { |attr| instance_variable_set("@#{attr}", party[attr.to_s]) } @members = @members.map{|mem| Member.new(mem)} if @members end |