{"id":21519328,"url":"https://github.com/alexwayfer/module_methods","last_synced_at":"2025-04-09T22:09:01.490Z","repository":{"id":39657645,"uuid":"277168825","full_name":"AlexWayfer/module_methods","owner":"AlexWayfer","description":"Extendable module for modules with instance and class methods","archived":false,"fork":false,"pushed_at":"2025-04-04T12:46:12.000Z","size":110,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-09T22:08:55.286Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/AlexWayfer.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","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-07-04T18:56:52.000Z","updated_at":"2024-01-18T17:25:35.000Z","dependencies_parsed_at":"2024-03-01T14:28:03.059Z","dependency_job_id":"98fb87c0-8ac4-42d3-b09f-164fdc8364ba","html_url":"https://github.com/AlexWayfer/module_methods","commit_stats":{"total_commits":92,"total_committers":2,"mean_commits":46.0,"dds":0.4347826086956522,"last_synced_commit":"4be5f640217daefa26342e45edec3785588b95b3"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fmodule_methods","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fmodule_methods/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fmodule_methods/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlexWayfer%2Fmodule_methods/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlexWayfer","download_url":"https://codeload.github.com/AlexWayfer/module_methods/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248119294,"owners_count":21050755,"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":[],"created_at":"2024-11-24T00:57:27.598Z","updated_at":"2025-04-09T22:09:01.458Z","avatar_url":"https://github.com/AlexWayfer.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Module Methods\n\n[![Cirrus CI - Base Branch Build Status](https://img.shields.io/cirrus/github/AlexWayfer/module_methods?style=flat-square)](https://cirrus-ci.com/github/AlexWayfer/module_methods)\n[![Codecov branch](https://img.shields.io/codecov/c/github/AlexWayfer/module_methods/main.svg?style=flat-square)](https://codecov.io/gh/AlexWayfer/module_methods)\n[![Code Climate](https://img.shields.io/codeclimate/maintainability/AlexWayfer/module_methods.svg?style=flat-square)](https://codeclimate.com/github/AlexWayfer/module_methods)\n[![Depfu](https://img.shields.io/depfu/AlexWayfer/benchmark_toys?style=flat-square)](https://depfu.com/repos/github/AlexWayfer/module_methods)\n[![Inline docs](https://inch-ci.org/github/AlexWayfer/module_methods.svg?branch=main)](https://inch-ci.org/github/AlexWayfer/module_methods)\n[![license](https://img.shields.io/github/license/AlexWayfer/module_methods.svg?style=flat-square)](https://github.com/AlexWayfer/module_methods/blob/main/LICENSE.txt)\n[![Gem](https://img.shields.io/gem/v/module_methods.svg?style=flat-square)](https://rubygems.org/gems/module_methods)\n\nExtendable module for modules with instance and class methods.\nThese modules can be included into each other modules and saving all chain,\nincluding `inherited` or `included` (class) methods.\n\nThere are no conflicts with `ActiveSupport::Concern`.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'module_methods'\n```\n\nAnd then execute:\n\n```shell\nbundle install\n```\n\nOr install it yourself as:\n\n```shell\ngem install module_methods\n```\n\n## Usage\n\n```ruby\nrequire 'module_methods'\n\nmodule SomeCommonCode\n  extend ::ModuleMethods::Extension\n\n  module ClassMethods\n    def inherited(klass)\n      ## manipulations with klass\n    end\n  end\n\n  def some_method\n    ## this is instance method\n  end\nend\n\nmodule MoreSpecificCommonCode\n  include SomeCommonCode\n\n  module ClassMethods\n    def inherited(klass)\n      ## you can control the order of `inherited` execution by `super`\n      ## this `super` executes `inherited` in `SomeCommonCode`\n      super\n    end\n  end\n\n  def some_another_method\n    ## This is another instance method.\n  end\nend\n\nclass BaseClass\n  include MoreSpecificCommonCode\n\n  ## Instance methods from modules are here.\nend\n\nclass EndPoint \u003c BaseClass\n  ## Both `inherited` from `SomeCommonCode` and `MoreSpecificCommonCode`\n  ## are executing here; private methods from modules are also here.\nend\n```\n\n## Development\n\nAfter checking out the repo, run `bundle install` to install dependencies.\n\nThen, run `toys rspec` to run the tests.\n\nTo install this gem onto your local machine, run `toys gem install`.\n\nTo release a new version, run `toys gem release %version%`.\nSee how it works [here](https://github.com/AlexWayfer/gem_toys#release).\n\n## Contributing\n\nBug reports and pull requests are welcome on [GitHub](https://github.com/AlexWayfer/module_methods).\n\n## License\n\nThe gem is available as open source under the terms of the\n[MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fmodule_methods","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falexwayfer%2Fmodule_methods","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falexwayfer%2Fmodule_methods/lists"}