Class: Codeforces::Models::Submission
- Defined in:
- lib/codeforces/models/submission.rb
Instance Attribute Summary collapse
-
#user_id ⇒ Object
readonly
Returns the value of attribute user_id.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(client, base) ⇒ Submission
constructor
A new instance of Submission.
- #user ⇒ Object
Methods inherited from Base
Constructor Details
#initialize(client, base) ⇒ Submission
Returns a new instance of Submission.
7 8 9 10 |
# File 'lib/codeforces/models/submission.rb', line 7 def initialize(client, base) super @user_id = base..members.first.handle end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class Codeforces::Models::Base
Instance Attribute Details
#user_id ⇒ Object (readonly)
Returns the value of attribute user_id.
5 6 7 |
# File 'lib/codeforces/models/submission.rb', line 5 def user_id @user_id end |
Instance Method Details
#user ⇒ Object
12 13 14 |
# File 'lib/codeforces/models/submission.rb', line 12 def user client.send(:user, user_id) end |