inaki-ibarra / oop-design-patterns

Examples of OOP design patterns written in Ruby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🗃️ OOP Design Patterns Ruby Examples

This repo contains various examples of common design patterns for Object Oriented Programming written in Ruby. The goal is to show how to implement these patterns with Ruby which is dynamically typed, doesn't have interface, method overloading and other concepts that are present in a typical object-oriented language.

Creational Design Patterns

Structural Design Patterns

Behavioral Design Patterns

Usage and Testing

You can run each pattern with Ruby. For example:

ruby -r './app.rb' -e 'Singleton::App.new.main'

You can also run tests with RSpec. Tests are provided and located in /spec.

Contributing

The examples here are open for improvement so feel free to report issues, add documentations, modify examples and send pull requests.

About

Examples of OOP design patterns written in Ruby


Languages

Language:Ruby 100.0%