{"id":16688003,"url":"https://github.com/danielpclark/elixirize","last_synced_at":"2025-07-31T04:13:39.924Z","repository":{"id":62557856,"uuid":"85975813","full_name":"danielpclark/elixirize","owner":"danielpclark","description":"Add ᐅ piping method to Ruby for an Elixir feel.  First parameter must be an object that responds to :call.","archived":false,"fork":false,"pushed_at":"2017-04-04T11:34:11.000Z","size":40,"stargazers_count":40,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-09T13:51:50.597Z","etag":null,"topics":[],"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/danielpclark.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-03-23T17:05:31.000Z","updated_at":"2024-07-14T01:54:25.000Z","dependencies_parsed_at":"2022-11-03T06:30:47.029Z","dependency_job_id":null,"html_url":"https://github.com/danielpclark/elixirize","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/danielpclark/elixirize","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Felixirize","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Felixirize/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Felixirize/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Felixirize/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danielpclark","download_url":"https://codeload.github.com/danielpclark/elixirize/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danielpclark%2Felixirize/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263086609,"owners_count":23411742,"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-10-12T15:26:24.425Z","updated_at":"2025-07-02T06:33:37.845Z","avatar_url":"https://github.com/danielpclark.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Gem Version](https://badge.fury.io/rb/elixirize.svg)](http://badge.fury.io/rb/elixirize)\n[![Code Climate](https://codeclimate.com/github/danielpclark/elixirize/badges/gpa.svg)](https://codeclimate.com/github/danielpclark/elixirize)\n[![Build Status](https://travis-ci.org/danielpclark/elixirize.svg)](https://travis-ci.org/danielpclark/elixirize)\n[![Test Coverage](https://codeclimate.com/github/danielpclark/elixirize/badges/coverage.svg)](https://codeclimate.com/github/danielpclark/elixirize)\n[![Inline docs](http://inch-ci.org/github/danielpclark/elixirize.svg?branch=master)](http://inch-ci.org/github/danielpclark/elixirize)\n[![SayThanks.io](https://img.shields.io/badge/SayThanks.io-%E2%98%BC-1EAEDB.svg)](https://saythanks.io/to/danielpclark)\n\n# Elixirize\n\nThis adds the `ᐅ` method to Ruby.  It pipes in the returned value of the left as the first parameter of the\nProc _(or anything with `:call` defined)_ on the right.\n\n### Unicode ᐅ\n\nTo enter ᐅ you need to:\n\n* **Linux:** type **CTRl-SHIFT-U** and then **1405** followed by the **Space** or **Enter** key.\n* **Mac:**  hold the **Option** key while you type **1405** and then release the **Option** key.\n* **VIM:** press **CTRL-v** then **SHIFT-U** then **1405** and hit **Enter**.\n* **Emacs:** press **CTRL-x** then **8** then **Enter** and type **1405** and hit **Enter**.\n\n## Installation\n\nAdd this line to your application's Gemfile:\n\n```ruby\ngem 'elixirize'\n```\n\nAnd then execute:\n\n    $ bundle\n\nOr install it yourself as:\n\n    $ gem install elixirize\n\n## Usage\n\n```ruby\ndef add a, b\n  a + b\nend\n\nsubtract = -\u003ea, b{ a - b }\n\nadd(4, 5).ᐅ subtract, 15\n# =\u003e -6\n\ndef divide a, b\n  a / b\nend\n\nadd(40, 60).ᐅ method(:divide), 20\n# =\u003e 5\n```\n\n## Extra\n\nSince Ruby is designed largely to call methods on the object that was returned\nI've written the `~` method on `Symbol` to allow method calls on the returned\nobject rather than only being the first parameter passed in.\n\n**Example:**\n\n```ruby\ns = \"a b c d\"\nval = s.\n  ᐅ(~:split, \" \").\n  ᐅ(~:join, \"-\").\n  ᐅ ~:capitalize\n\nval\n# =\u003e \"A-b-c-d\"\n```\n\nYou can mix both behaviors without any issue.\n\nThis may seem counter intuitive as it's the same thing as just calling the method\non the object, but consider this a noticeable refactoring step.  If you're designing\na project in a manner where you want results piped in as the first parameter then\nthe tilde-symbol will be your TODO reminder to convert/refactor how your code base is\nimplemented.\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/danielpclark/elixirize.\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\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Felixirize","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanielpclark%2Felixirize","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanielpclark%2Felixirize/lists"}