{"id":15032840,"url":"https://github.com/ruby/e2mmap","last_synced_at":"2025-10-19T22:32:10.436Z","repository":{"id":33649922,"uuid":"138372470","full_name":"ruby/e2mmap","owner":"ruby","description":"Module for defining custom exceptions with specific messages.","archived":false,"fork":false,"pushed_at":"2022-07-14T08:18:28.000Z","size":35,"stargazers_count":10,"open_issues_count":0,"forks_count":3,"subscribers_count":32,"default_branch":"master","last_synced_at":"2025-01-30T07:32:47.294Z","etag":null,"topics":["ruby"],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruby.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-23T04:55:16.000Z","updated_at":"2023-06-16T07:36:53.000Z","dependencies_parsed_at":"2022-07-15T20:00:33.876Z","dependency_job_id":null,"html_url":"https://github.com/ruby/e2mmap","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fe2mmap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fe2mmap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fe2mmap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruby%2Fe2mmap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruby","download_url":"https://codeload.github.com/ruby/e2mmap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":237224823,"owners_count":19275090,"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":["ruby"],"created_at":"2024-09-24T20:19:33.898Z","updated_at":"2025-10-19T22:32:05.149Z","avatar_url":"https://github.com/ruby.png","language":"Ruby","readme":"# Exception2MessageMapper\n\nHelper module for easily defining exceptions with predefined messages.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'e2mmap'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install e2mmap\n\n## Usage\n\n1.\n\n```\nclass Foo\n  extend Exception2MessageMapper\n  def_e2message ExistingExceptionClass, \"message...\"\n  def_exception :NewExceptionClass, \"message...\"[, superclass]\n  ...\nend\n```\n\n2.\n\n```\nmodule Error\n  extend Exception2MessageMapper\n  def_e2message ExistingExceptionClass, \"message...\"\n  def_exception :NewExceptionClass, \"message...\"[, superclass]\n  ...\nend\n\nclass Foo\n  include Error\n  ...\nend\n\nfoo = Foo.new\nfoo.Fail ....\n```\n\n3.\n\n```\nmodule Error\n  extend Exception2MessageMapper\n  def_e2message ExistingExceptionClass, \"message...\"\n  def_exception :NewExceptionClass, \"message...\"[, superclass]\n  ...\nend\n\nclass Foo\n  extend Exception2MessageMapper\n  include Error\n  ...\nend\n\nFoo.Fail NewExceptionClass, arg...\nFoo.Fail ExistingExceptionClass, arg...\n```\n\n## Development\n\nAfter checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.\n\nTo install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/ruby/e2mmap.\n\n## License\n\nThe gem is available as open source under the terms of the [2-Clause BSD License](https://opensource.org/licenses/BSD-2-Clause).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fe2mmap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruby%2Fe2mmap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruby%2Fe2mmap/lists"}