-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(lang): Add posibility to generate solution template
For now we only have support for ruby but other languages can be easily addded.
- Loading branch information
1 parent
335e5a7
commit 1639fe4
Showing
3 changed files
with
118 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# frozen_string_literal: true | ||
|
||
require "pry" | ||
require "minitest/autorun" | ||
|
||
def read_file(filename) | ||
# Get the directory of the currently executing script | ||
# Join the script directory with the filename | ||
# Read the content of the file | ||
File.read(File.join(__dir__, filename)) | ||
end | ||
|
||
def solve(filename) | ||
read_file(filename) | ||
0 | ||
end | ||
|
||
def solve2(filename) | ||
read_file(filename) | ||
0 | ||
end | ||
|
||
class AoCTest < Minitest::Test | ||
def test_solve | ||
assert solve("test.txt") == 0 | ||
end | ||
|
||
def test_solve2 | ||
assert solve2("test.txt") == 0 | ||
end | ||
end | ||
|
||
puts 'Part1', solve('input.txt') | ||
puts 'Part2', solve2('input.txt') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters