Skip to content

filipewl/tls

Repository files navigation

Smallest Goals Difference CLI

This CLI tool processes goals data from a .dat file and finds the Team with the smallest difference in for and against goals.

Usage

Running the Script

You can run the script in two ways:

1. Make the Script Executable

First, ensure the script is executable. You can make the script executable by running:

chmod +x bin/smallest_goals_difference

Then, you can execute the script directly from the terminal:

bin/smallest_goals_difference data/soccerr.dat

2. Run with Ruby Directly

If you prefer not to change file permissions, you can run the script using the Ruby interpreter directly:

ruby bin/smallest_goals_difference data/soccerr.dat

Example of the output:

Team with the smallest difference in for and against goals: Aston_Villa
Smallest difference: 1 (For 46 - Against 47)

Running the tests

Install the dependencies with Bundler:

bundle install

Run the tests with RSpec:

bundle exec rspec

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages