{"id":15431487,"url":"https://github.com/er-contreras/oop_animal","last_synced_at":"2025-07-10T01:36:54.530Z","repository":{"id":138519907,"uuid":"584567831","full_name":"er-contreras/oop_animal","owner":"er-contreras","description":"It's a veterinary base on a UML using relational classes","archived":false,"fork":false,"pushed_at":"2023-01-05T01:43:14.000Z","size":102,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-18T06:52:11.858Z","etag":null,"topics":["oop","ruby","sql"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/er-contreras.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2023-01-03T00:00:22.000Z","updated_at":"2023-01-22T00:37:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"d4ae052e-4dab-4d28-b4be-24ee80592bc2","html_url":"https://github.com/er-contreras/oop_animal","commit_stats":{"total_commits":15,"total_committers":1,"mean_commits":15.0,"dds":0.0,"last_synced_commit":"939fd7f3a4fb2fc123c3b4e64a8dea218ba5a209"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/er-contreras%2Foop_animal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/er-contreras%2Foop_animal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/er-contreras%2Foop_animal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/er-contreras%2Foop_animal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/er-contreras","download_url":"https://codeload.github.com/er-contreras/oop_animal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245978228,"owners_count":20703677,"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":["oop","ruby","sql"],"created_at":"2024-10-01T18:22:39.286Z","updated_at":"2025-03-28T05:41:43.085Z","avatar_url":"https://github.com/er-contreras.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OOP(Object-Oriented Programming) with Ruby\n\nIt was applied the four principles of OOP using plain ruby.\n\n1. Encapsulation\n2. Abstraction\n3. Inheritance\n4. Polymorphism\n\nThe first one allow us to handle public and private variables with accessors.\nIn other words getter and setters methods that give us the opportunity to write and read\nvariables of the object.\n\nThe Second one give us the chance to abstract part of the code to make it more clean.\nInstead of call the class `def animal.speak: end` in the method we can just say `def speak; end`.\n\nThe third one is just taking the attributes of the parent class in order to avoid `nil`\noutputs and set some specific attributes to the child class.\n\nThe fourth, is when we just add the same name of a method in different classes but with different result.\n\n## Applying Composition\n\nWe add composition in order to add object of food classes in Dog, Spider and Animals. This\nhelp us not depend too much on inheritance.\n\n## UML\n\n![](UML.png)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fer-contreras%2Foop_animal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fer-contreras%2Foop_animal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fer-contreras%2Foop_animal/lists"}