Sha256: 7578a4115838286e47d5b8a9d279a090d4b84cc27fd567b86ecda3fd76a367f2

Contents?: true

Size: 615 Bytes

Versions: 1

Compression:

Stored size: 615 Bytes

Contents

# frozen_string_literal: true

require_relative "./at_coder/contest"
require_relative "./at_coder/sample"
require_relative "./at_coder/task"

module Acclir
  module AtCoder
    ATCODER_URL = "https://atcoder.jp"

    ATCODER_TASKS_PATH_PROC = ->(contest_id) { "/contests/#{contest_id}/tasks" }
    ATCODER_TASKS_URL_PROC = ->(contest_id) { "#{ATCODER_URL}/contests/#{contest_id}/tasks" }

    ATCODER_TASK_PATH_REGEX_PROC = ->(contest_id) { %r{^/contests/#{contest_id}/tasks/(?<task>\w+)$} }
    ATCODER_TASK_URL_PROC = ->(contest_id, task_id) { "#{ATCODER_URL}/contests/#{contest_id}/tasks/#{task_id}" }
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acclir-0.1.0 lib/acclir/at_coder.rb