Module: Codeforces::Helper
- Included in:
- Client
- Defined in:
- lib/codeforces/helper.rb
Instance Method Summary collapse
Instance Method Details
#each_contest ⇒ Object
3 4 5 |
# File 'lib/codeforces/helper.rb', line 3 def each_contest api.contest.list.each {|contest| yield(contest) if block_given? } end |
#each_status ⇒ Object
11 12 13 |
# File 'lib/codeforces/helper.rb', line 11 def each_status api.problemset.recent_status.map {|s| create_submission s }.each {|status| yield(status) if block_given? } end |
#user(handle) ⇒ Object
7 8 9 |
# File 'lib/codeforces/helper.rb', line 7 def user(handle) create_user api.user.info(handle).first end |