{"id":15713699,"url":"https://github.com/j8r/crystal-object-send","last_synced_at":"2025-05-12T22:55:25.055Z","repository":{"id":152029264,"uuid":"170324556","full_name":"j8r/crystal-object-send","owner":"j8r","description":"Interpret a String to an Object method call","archived":false,"fork":false,"pushed_at":"2019-08-09T23:35:36.000Z","size":9,"stargazers_count":13,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-12T22:55:19.966Z","etag":null,"topics":["crystal-lang","method","send","string"],"latest_commit_sha":null,"homepage":null,"language":"Crystal","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/j8r.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-02-12T13:39:57.000Z","updated_at":"2023-02-17T12:01:35.000Z","dependencies_parsed_at":"2023-09-13T21:52:02.223Z","dependency_job_id":null,"html_url":"https://github.com/j8r/crystal-object-send","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystal-object-send","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystal-object-send/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystal-object-send/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/j8r%2Fcrystal-object-send/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/j8r","download_url":"https://codeload.github.com/j8r/crystal-object-send/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253837400,"owners_count":21971982,"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":["crystal-lang","method","send","string"],"created_at":"2024-10-03T21:32:58.148Z","updated_at":"2025-05-12T22:55:25.020Z","avatar_url":"https://github.com/j8r.png","language":"Crystal","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crystal Object#send\n\n[![Build Status](https://cloud.drone.io/api/badges/j8r/crystal-object-send/status.svg)](https://cloud.drone.io/j8r/crystal-object-send)\n[![ISC](https://img.shields.io/badge/License-ISC-blue.svg?style=flat-square)](https://en.wikipedia.org/wiki/ISC_license)\n\nInterpret a String to an Object method call.\n\nSimilar to the Ruby's `Object#send`.\n\nHere macros and the `Crystal::Parser` are used to build a pseudo interpreter.\n\n## Disclaimer\n\nThere are lots of limitations, this library is mainly an experiment.\n\nUsually you better avoid using it and interpret the string on your own. It would be more performant and safer.\n\n## Installation\n\nAdd the dependency to your `shard.yml`:\n\n```yaml\ndependencies:\n  object-send:\n    github: j8r/crystal-object-send\n```\n\n## Examples\n\n```cr\n\"abc\".send \"chars\"         #=\u003e ['a', 'b', 'c']\n\"abc\".send \"lchop('a')\"    #=\u003e \"bc\"\n\"abc\".send \"insert 1, 'z'\" #=\u003e \"azbc\"\n2.send(\"+ 3\")              #=\u003e 5\n\nvar = \"first 2\"\n[0, 1, 3].send(var)        #=\u003e [0, 1]\n[0, 1, 2].send(\"[-1]?\")    #=\u003e eq 2\n[0, 1, 2].send(\"[..]\")     #=\u003e eq [0, 1, 2]\n```\n\nSee more in the [specs](spec/object_send_spec.cr)\n\n## License\n\nCopyright (c) 2019 Julien Reichardt - ISC License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcrystal-object-send","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fj8r%2Fcrystal-object-send","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fj8r%2Fcrystal-object-send/lists"}