struct NCTU::OJ::TestData::Flags

Overview

Extend the flags struct to include the flag

Defined in:

commands/test_data.cr:1
commands/test_data.cr:4
commands/test_data.cr:5
commands/test_data.cr:6
commands/test_data.cr:7
commands/test_data.cr:8
commands/test_data.cr:9
commands/test_data.cr:10
commands/test_data.cr:11
commands/test_data.cr:12

Constant Summary

DESCRIPTIONS = {} of String => String
SPECS = {"__help__" => {kind: "bool", type: "Bool", default: "false", description: {"--help", "Displays help for the current command."}, short: "nil", long: "help", is_required: true}, "problem_id" => {kind: "nil", type: "Int32", default: "nil", description: {"--problem-id, -p", "Problem id"}, short: "p", long: "problem-id", is_required: false}, "dir" => {kind: "nil", type: "String", default: "nil", description: {"--dir, -d", "Test data dir"}, short: "d", long: "dir", is_required: false}, "number" => {kind: "nil", type: "Int32", default: "10", description: {"--number, -n (default: 10)", "The number of test data includes sample"}, short: "n", long: "number", is_required: true}, "sample" => {kind: "nil", type: "Int32", default: "2", description: {"--sample, -s (default: 2)", "The number of sample test data"}, short: "s", long: "sample", is_required: true}, "clear" => {kind: "bool", type: "Bool", default: "false", description: {"--clear, -c", "Delete test data before upload"}, short: "c", long: "clear", is_required: true}, "time" => {kind: "nil", type: "Int32", default: "1000", description: {"--time, -t (default: 1000)", "Time limit (ms)"}, short: "t", long: "time", is_required: true}, "memory" => {kind: "nil", type: "Int32", default: "262144", description: {"--memory, -m (default: 262144)", "Memory limit (KB)"}, short: "m", long: "memory", is_required: true}, "output" => {kind: "nil", type: "Int32", default: "262144", description: {"--output, -o (default: 262144)", "Output limit (KB)"}, short: "o", long: "output", is_required: true}, "reducer" => {kind: "nil", type: "String", default: "\"min\"", description: {"--reducer, -r (default: \"min\")", "Reducer for score (must be min or sum)"}, short: "r", long: "reducer", is_required: true}} of String => NamedTuple(kind: String, type: String, default: String, description: Tuple(String, String | ::Nil), short: String | ::Nil, long: String, is_required: Bool)

Constructors

Instance Method Summary

Constructor Detail

def self.new(command : Admiral::Command) #

Instance Method Detail

def __help__ #

def clear #

[View source]
def dir : String? #

[View source]
def inspect(io) #

[View source]
def memory #

[View source]
def number #

[View source]
def output #

[View source]
def problem_id : Int32? #

[View source]
def reducer #

[View source]
def sample #

[View source]
def time #

[View source]
def validate!(command) #