Class: Acclir::AtCoder::Contest

Inherits:
Object
  • Object
show all
Defined in:
lib/acclir/at_coder/contest.rb

Overview

AtCoder contest

Constant Summary collapse

TASKS_PATH_PROC =
->(id) { "/contests/#{id}/tasks" }

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(id) ⇒ Contest

Returns a new instance of Contest.



11
12
13
# File 'lib/acclir/at_coder/contest.rb', line 11

def initialize(id)
  @id = id
end

Instance Attribute Details

#idObject (readonly)

Returns the value of attribute id.



9
10
11
# File 'lib/acclir/at_coder/contest.rb', line 9

def id
  @id
end

Instance Method Details

#tasksObject



15
16
17
# File 'lib/acclir/at_coder/contest.rb', line 15

def tasks
  @tasks ||= extract_task_ids.map { |task_id| Task.new(id, task_id) }
end