{"id":21926996,"url":"https://github.com/rzane/proc_utils","last_synced_at":"2025-04-19T17:25:23.728Z","repository":{"id":56888862,"uuid":"87362781","full_name":"rzane/proc_utils","owner":"rzane","description":"A set of functional utilities for working with callables in Ruby","archived":false,"fork":false,"pushed_at":"2017-04-06T03:23:52.000Z","size":12,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-08T13:05:47.244Z","etag":null,"topics":["functional-programming","ruby"],"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/rzane.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":"2017-04-05T22:38:02.000Z","updated_at":"2021-01-13T21:49:55.000Z","dependencies_parsed_at":"2022-08-20T16:00:22.080Z","dependency_job_id":null,"html_url":"https://github.com/rzane/proc_utils","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/rzane%2Fproc_utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fproc_utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fproc_utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rzane%2Fproc_utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rzane","download_url":"https://codeload.github.com/rzane/proc_utils/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226995161,"owners_count":17714778,"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":["functional-programming","ruby"],"created_at":"2024-11-28T22:12:56.019Z","updated_at":"2024-11-28T22:12:56.733Z","avatar_url":"https://github.com/rzane.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ProcUtils\n\nA set of functional utilities for working with callables in Ruby.\n\nHeavily inspired by [lodash](https://lodash.com/docs).\n\n## Introduction\n\nI love Symbol#to_proc. It just feels good.\n\n```ruby\nemails.each(\u0026:deliver)\n```\n\nHowever, if your method takes an argument, you need to refactor to use a block.\n\n```ruby\nemails.each { |email| email.deliver(:hello) }\n```\n\nWhat if you could do this?\n\n```ruby\nemails.each(\u0026:deliver.partial(:hello))\n```\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'proc_utils'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install proc_utils\n\n## Extending Procs\n\n```ruby\nrequire 'proc_utils/core_ext/proc'\n```\n\nNow, procs will have the following methods:\n\n* partial\n* partial_right\n* bind\n* flip\n* wrap\n* compose\n* memoize\n* once\n\n## Extending Symbols\n\n```ruby\nrequire 'proc_utils/core_ext/symbol'\n```\n\nNow, symbols will have the following methods:\n\n* partial\n* partial_right\n* bind\n* memoize\n* once\n\n## Using without CoreExtensions\n\nI get it, core extensions are scary. Lucky for you, ProcUtils offers pure functions.\n\nFor example:\n\n```ruby\nfunc = proc { |name| puts name }\nfunc = ProcUtils.bind(func, 'Rick Flair')\nfunc.call\n```\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/rzane/proc_utils.\n\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzane%2Fproc_utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frzane%2Fproc_utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frzane%2Fproc_utils/lists"}