We've added multiple exciting mini-projects to complement our Ruby for Beginners and Advanced Ruby courses. These projects will give you practical experience in building structured, maintainable codebases for real-world applications.
This project will help you apply Ruby concepts by creating a command-line tool that mimics the basic functionality of Rake, a task automation tool.
It's important to complete this mini-project after the Advanced Ruby course to reinforce your knowledge and learn how to structure a Ruby codebase similar to a production-ready gem.
By the end of this project, you will have a solid understanding of how to create a simple task automation tool, similar to Rake, using Ruby.
main
Object: Understanding how methods included in the main
object become available globally.
my_rake/
├── lib/
│ ├── my_rake/
│ │ ├── task.rb
│ │ └── dsl.rb
│ └── my_rake.rb
├── Rakefile
├── bin/
│ └── my_rake.rb
This project will help you apply Ruby concepts by creating a command-line tool to encrypt and decrypt files using simple algorithms like Caesar Cipher.
It's important to complete this mini-project after the Ruby for Beginners course to reinforce your knowledge.
The codebase is structured as a production-ready gem, which gives you a taste of how professional Ruby projects are organized.
File
class is used for file manipulation, while the Dir
class is used for directory operations. We will use them to read, write, and manipulate files.file_encryption/ ├── lib/ │ ├── file_encryption/ │ │ ├── encrypter.rb │ │ ├── decrypter.rb │ │ └── utilities.rb │ └── file_encryption.rb ├── bin/ │ └── encrypt.rb │ └── decrypt.rb ├── test_directory/ │ ├── sample.txt
In this project, we'll create a script to organize files in a directory by their extensions.
For example, .jpg
files go into an Images
folder, .txt
files go into a Documents
folder, etc.
By the end of this project, you will have a deeper understanding of Ruby file operations, directory management, and practical usage of classes and modules to organize code effectively.
It's important to complete this mini-project after the Ruby for Beginners course to reinforce your knowledge
The codebase is structured as a production-ready gem, which gives you a taste of how professional Ruby projects are organized.
In this project, we will be using the following tools and concepts:
Hash
, Array
, and String
to represent the different layers of data needed for the mini project.file_organizer/ ├── lib/ │ ├── file_organizer/ │ │ ├── organizer.rb │ │ ├── file_categorizer.rb │ │ ├── file_mover.rb │ │ └── utilities.rb │ └── file_organizer.rb ├── bin/ │ └── organize.rb ├── test_directory/ │ ├── image.jpg │ ├── document.txt │ ├── video.mp4 │ ├── music.mp3 │ └── archive.zip
This project will help you apply Ruby concepts by creating a basic version of the popular interactor
gem.
This is an excellent way to practice Advanced Ruby skills and learn how to structure a Ruby codebase similar to a production-ready gem.
By the end of this project, you will be proficient in creating an interactor pattern for handling business logic in Ruby applications.
You will learn to manage context using OpenStruct
, handle custom errors, and implement argument forwarding.
This project will also enhance your skills in structuring a Ruby codebase and creating modular, reusable code.
my_interactor/ ├── lib/ │ ├── my_interactor/ │ │ ├── context.rb │ │ └── failure.rb │ └── my_interactor.rb ├── bin/ │ └── create_user.rb
Let's get rid of the HTML explicit receiver to enhance our DSL
In this mini project, we'll improve our HTML Generator DSL by removing the explicit HTML receiver, making our code more elegant and readable. You'll learn advanced Ruby techniques for creating intuitive domain-specific languages.
A fun way to learn more about metaprogramming and Ruby internals
In this mini project, you'll recreate Ruby's attr_reader, attr_writer, and attr_accessor macros from scratch. This hands-on exercise will deepen your understanding of Ruby's metaprogramming capabilities and how the language works under the hood.
Let's recode a robust version of RSpec
In this challenging mini project, you'll build a simplified version of the popular RSpec testing framework. You'll implement core features like describe, context, it, and expectations, gaining deep insights into how testing frameworks work.
Let's recode a robust version of ActiveRecord::Base and ActiveRecord::Relation
In this advanced mini project, you'll implement a simplified version of Rails' ActiveRecord ORM. You'll create the core functionality for database connections, model definitions, and query building, gaining valuable insights into how ORMs work.
RubyCademy ©