{"id":18319758,"url":"https://github.com/redding/much-not-given","last_synced_at":"2025-04-09T14:22:42.138Z","repository":{"id":55102815,"uuid":"324016268","full_name":"redding/much-not-given","owner":"redding","description":"Add \"not given\" default values to your objects.","archived":false,"fork":false,"pushed_at":"2022-02-25T15:37:36.000Z","size":17,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-16T00:24:10.386Z","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/redding.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}},"created_at":"2020-12-23T22:44:47.000Z","updated_at":"2021-10-29T19:03:26.000Z","dependencies_parsed_at":"2022-08-14T12:01:03.107Z","dependency_job_id":null,"html_url":"https://github.com/redding/much-not-given","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fmuch-not-given","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fmuch-not-given/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fmuch-not-given/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redding%2Fmuch-not-given/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redding","download_url":"https://codeload.github.com/redding/much-not-given/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248054200,"owners_count":21039952,"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-05T18:14:10.466Z","updated_at":"2025-04-09T14:22:42.098Z","avatar_url":"https://github.com/redding.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MuchNotGiven\n\nAdd \"not given\" default values to your objects. This allows you to safely detect whether a method has been given argument values or not.\n\n## Usage\n\n```ruby\nmodule MyNamespace\n  include MuchNotGiven\nend\n\nMyNamespace.not_given                           # =\u003e MyNamespace.not_given\n\"some value\" == MyNamespace.not_given           # =\u003e false\nMyNamespace.not_given?(\"some value\")            # =\u003e false\nMyNamespace.not_given?(MyNamespace.not_given?)  # =\u003e true\nMyNamespace.given?(\"some value\")                # =\u003e true\nMyNamespace.given?(MyNamespace.not_given?)      # =\u003e false\n\ndef my_method(value = MyNamespace.not_given)\n  if MyNamespace.given?(value)\n    # do something with the given value\n  end\nend\n\ndef my_method(arg_value = MyNamespace.not_given)\n  value = MyNamespace.given?(value) ? value : \"some default value\"\n\n  # do something with the optionally defaulted value\nend\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n    gem \"much-not-given\"\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install much-not-given\n\n## Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am \"Added some feature\"`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredding%2Fmuch-not-given","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredding%2Fmuch-not-given","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredding%2Fmuch-not-given/lists"}