Class: AtcoderGreedy::Command
- Inherits:
-
Thor
- Object
- Thor
- AtcoderGreedy::Command
- Defined in:
- lib/atcoder_greedy/command.rb,
lib/atcoder_greedy/command/test.rb,
lib/atcoder_greedy/command/create.rb
Instance Method Summary collapse
Instance Method Details
#create(contest_name) ⇒ Object
8 9 10 |
# File 'lib/atcoder_greedy/command/create.rb', line 8 def create(contest_name) Contest.new(contest_name.downcase) end |
#test(problem_name) ⇒ Object
12 13 14 15 16 17 |
# File 'lib/atcoder_greedy/command/test.rb', line 12 def test(problem_name) name = File.basename(problem_name, '.*') puts "Running a test for problem #{name}..." TestCase.new(name).validate puts "Test done." end |