Class: Codeforces::Models::User
- Defined in:
- lib/codeforces/models/user.rb
Instance Attribute Summary collapse
-
#user ⇒ Object
readonly
Returns the value of attribute user.
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(client, base_user) ⇒ User
constructor
A new instance of User.
- #submissions ⇒ Object
Constructor Details
#initialize(client, base_user) ⇒ User
Returns a new instance of User.
7 8 9 10 11 |
# File 'lib/codeforces/models/user.rb', line 7 def initialize(client, base_user) super(client) @user = base_user end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(method, *args, &block) ⇒ Object (private)
19 20 21 |
# File 'lib/codeforces/models/user.rb', line 19 def method_missing(method, *args, &block) user.send method, *args, &block end |
Instance Attribute Details
#user ⇒ Object (readonly)
Returns the value of attribute user.
5 6 7 |
# File 'lib/codeforces/models/user.rb', line 5 def user @user end |
Instance Method Details
#submissions ⇒ Object
13 14 15 |
# File 'lib/codeforces/models/user.rb', line 13 def submissions client.api.user.status(user.handle) end |