{"id":13877648,"url":"https://github.com/davidgf/design-patterns-in-ruby","last_synced_at":"2025-05-15T03:02:56.420Z","repository":{"id":41162052,"uuid":"79028848","full_name":"davidgf/design-patterns-in-ruby","owner":"davidgf","description":"GoF design patterns in Ruby","archived":false,"fork":false,"pushed_at":"2024-04-29T16:00:41.000Z","size":58,"stargazers_count":2495,"open_issues_count":4,"forks_count":387,"subscribers_count":76,"default_branch":"master","last_synced_at":"2025-04-14T00:58:40.033Z","etag":null,"topics":["design-patterns","ruby"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/davidgf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-01-15T11:37:33.000Z","updated_at":"2025-03-29T06:05:24.000Z","dependencies_parsed_at":"2022-07-16T18:16:56.047Z","dependency_job_id":"8e2db461-0ebe-487e-9083-806e4b4a906a","html_url":"https://github.com/davidgf/design-patterns-in-ruby","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgf%2Fdesign-patterns-in-ruby","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgf%2Fdesign-patterns-in-ruby/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgf%2Fdesign-patterns-in-ruby/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davidgf%2Fdesign-patterns-in-ruby/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davidgf","download_url":"https://codeload.github.com/davidgf/design-patterns-in-ruby/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254264737,"owners_count":22041789,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["design-patterns","ruby"],"created_at":"2024-08-06T08:01:16.206Z","updated_at":"2025-05-15T03:02:56.312Z","avatar_url":"https://github.com/davidgf.png","language":null,"readme":"# Design Patterns in Ruby\n\nSummary of the design patterns explained in the book [Design Patterns in Ruby](http://designpatternsinruby.com/), where [Russ Olsen](http://russolsen.com/) explains and adapts to Ruby 14 of the original 23 GoF design patterns.\n\n## Design Patterns\n\n### GoF Patterns\n\n* [Adapter](adapter.md): helps two incompatible interfaces to work together\n* [Builder](builder.md): create complex objects that are hard to configure\n* [Command](command.md): performs some specific task without having any information about the receiver of the request\n* [Composite](composite.md): builds a hierarchy of tree objects and interacts with all them the same way\n* [Decorator](decorator.md): vary the responsibilities of an object adding some features\n* [Factory](factory.md): create objects without having to specify the exact class of the object that will be created\n* [Interpreter](interpreter.md): provides a specialized language to solve a well defined problem of know domain\n* [Iterator](iterator.md): provides a way to access a collection of sub-objects without exposing the underlying representation\n* [Observer](observer.md): helps building a highly integrated system, maintainable and avoids coupling between classes\n* [Proxy](proxy.md): allows us having more control over how and when we access to a certain object\n* [Singleton](singleton.md): have a single instance of certain class across the application\n* [Strategy](strategy.md): varies part of an algorithm at runtime\n* [Template Method](template_method.md): redefines certain steps of an algorithm without changing the algorithm's structure\n\n### Non-GoF Patterns: Patterns For Ruby\n\n* [Convention Over Configuration](convention_over_configuration.md): build an extensible system and not carrying the configuration burden.\n* [Domain-Specific Language](dsl.md): build a convenient syntax for solving problems of a specific domain.\n* [Meta-Programming](meta_programming.md): gain more flexibility when defining new classes and create custom tailored objects on the fly.\n\n\n## Contributing\n\nContributions are welcome! What could you do?:\n* Find typos and grammar mistakes\n* Propose a better way to explain a pattern\n* Add clearer examples of a pattern usage\n* Add other GoF patterns that are not covered in the book\n\n**Code examples refactoring** PR's will **not be considered**. The examples provided by Russ Olsen in his book are meant to be simple and self explanatory, not the best performing or most elegant, their purpose is just educational.\n","funding_links":[],"categories":["Programming Language Design Patterns","Others","Language/Framework design patterns (mainly GoF)","GoF design patterns (Language/Framework specifc)"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgf%2Fdesign-patterns-in-ruby","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavidgf%2Fdesign-patterns-in-ruby","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavidgf%2Fdesign-patterns-in-ruby/lists"}