Class: Codeforces::Api
- Inherits:
-
Object
- Object
- Codeforces::Api
- Defined in:
- lib/codeforces/api.rb,
lib/codeforces/api/user.rb,
lib/codeforces/api/contest.rb,
lib/codeforces/api/problem_set.rb
Defined Under Namespace
Classes: Contest, ProblemSet, User
Instance Attribute Summary collapse
-
#client ⇒ Object
readonly
Returns the value of attribute client.
Instance Method Summary collapse
- #contest ⇒ Object
-
#initialize(new_client) ⇒ Api
constructor
A new instance of Api.
- #problemset ⇒ Object
- #user ⇒ Object
Constructor Details
#initialize(new_client) ⇒ Api
Returns a new instance of Api.
9 10 11 |
# File 'lib/codeforces/api.rb', line 9 def initialize(new_client) @client = new_client end |
Instance Attribute Details
#client ⇒ Object (readonly)
Returns the value of attribute client.
7 8 9 |
# File 'lib/codeforces/api.rb', line 7 def client @client end |
Instance Method Details
#contest ⇒ Object
13 14 15 |
# File 'lib/codeforces/api.rb', line 13 def contest @contest ||= ::Codeforces::Api::Contest.new(client) end |
#problemset ⇒ Object
17 18 19 |
# File 'lib/codeforces/api.rb', line 17 def problemset @problem_set ||= ::Codeforces::Api::ProblemSet.new(client) end |
#user ⇒ Object
21 22 23 |
# File 'lib/codeforces/api.rb', line 21 def user @user ||= ::Codeforces::Api::User.new(client) end |