{"id":20263501,"url":"https://github.com/inaki-ibarra/oop-design-patterns","last_synced_at":"2025-03-03T19:59:18.519Z","repository":{"id":133110781,"uuid":"239449937","full_name":"inaki-ibarra/oop-design-patterns","owner":"inaki-ibarra","description":"Examples of OOP design patterns written in Ruby","archived":false,"fork":false,"pushed_at":"2020-02-20T12:23:29.000Z","size":51,"stargazers_count":2,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-14T04:44:26.761Z","etag":null,"topics":["examples-ruby","oop","patterns","ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","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/inaki-ibarra.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":"2020-02-10T07:12:59.000Z","updated_at":"2020-02-25T00:16:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"6124fffd-7033-4a38-9239-fb32ad3eb970","html_url":"https://github.com/inaki-ibarra/oop-design-patterns","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/inaki-ibarra%2Foop-design-patterns","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inaki-ibarra%2Foop-design-patterns/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inaki-ibarra%2Foop-design-patterns/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/inaki-ibarra%2Foop-design-patterns/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/inaki-ibarra","download_url":"https://codeload.github.com/inaki-ibarra/oop-design-patterns/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241731744,"owners_count":20010781,"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":["examples-ruby","oop","patterns","ruby"],"created_at":"2024-11-14T11:35:23.004Z","updated_at":"2025-03-03T19:59:18.432Z","avatar_url":"https://github.com/inaki-ibarra.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# :card_file_box: OOP Design Patterns Ruby Examples\r\n\r\nThis 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.\r\n\r\n## Creational Design Patterns\r\n\r\n- [Factory Method](creational/factory_method)\r\n- [Abstract Factory](creational/abstract_factory)\r\n- [Builder](creational/builder)\r\n- [Prototype](creational/prototype)\r\n- [Singleton](creational/singleton)\r\n\r\n## Structural Design Patterns\r\n\r\n- [Adapter](structural/adapter)\r\n- [Bridge](structural/bridge)\r\n- [Composite](structural/composite)\r\n- [Decorator](structural/decorator)\r\n- [Facade](structural/facade)\r\n- [Flyweight](structural/flyweight)\r\n- [Proxy](structural/proxy)\r\n\r\n## Behavioral Design Patterns\r\n\r\n- [Chain of Responsibility](behavioral/chain_of_responsibility)\r\n- [Command](behavioral/command)\r\n- [Iterator](behavioral/iterator)\r\n- [Mediator](behavioral/mediator)\r\n- [Memento](behavioral/memento)\r\n- [Observer](behavioral/observer)\r\n- [State](behavioral/state)\r\n- [Strategy](behavioral/strategy)\r\n- [Template Method](behavioral/template_method)\r\n- [Visitor](behavioral/visitor)\r\n\r\n## Usage and Testing\r\n\r\nYou can run each pattern with Ruby. For example:\r\n\r\n`ruby -r './app.rb' -e 'Singleton::App.new.main'`\r\n\r\nYou can also run tests with RSpec. Tests are provided and located in `/spec`.\r\n\r\n## Contributing\r\n\r\nThe examples here are open for improvement so feel free to report issues, add documentations, modify examples and send pull requests.\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finaki-ibarra%2Foop-design-patterns","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finaki-ibarra%2Foop-design-patterns","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finaki-ibarra%2Foop-design-patterns/lists"}