Skip to content

Paulo-Rodrigues/ruby-monads

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ruby Monads: A Study Project

This project is a study implementation of monads in Ruby, focusing on the Maybe and Result monads. It is designed to help understand the concepts of monads, functional programming, and how they can be applied in Ruby.

The project currently includes:

  • Maybe Monad: Represents optional values (Some and None).
  • Result Monad: Represents computations that can succeed (Ok) or fail (Err).

More monads may be added in the future as the project evolves.

Getting Started

Prerequisites

  • Docker and Docker Compose installed on your machine.

Cloning the Repository

Clone the repository to your local machine:

git clone https://github.com/Paulo-Rodrigues/ruby-monads.git

cd ruby-monads

Running with Docker

This project uses Docker to provide a consistent development environment. To build and run the project, follow these steps:

  1. Build the Docker image:

    docker-compose build

  2. Run the container and start a Bash session:

    docker-compose run --rm ruby-monads bash

    This will drop you into a Bash shell inside the container, where you can execute Ruby commands.


Running Tests

This project uses RSpec for testing. To run the tests, execute the following command inside the Docker container:

bundle exec rspec

This will run all the test files in the spec directory and display the results.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors