{"id":33916828,"url":"https://github.com/sampersand/blankity","last_synced_at":"2026-03-17T16:08:50.430Z","repository":{"id":319892277,"uuid":"1080001690","full_name":"sampersand/blankity","owner":"sampersand","description":"Provides a \"Blank\" and `ToXXX` classes in ruby","archived":false,"fork":false,"pushed_at":"2025-11-11T01:08:27.000Z","size":98,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-11-30T02:17:04.805Z","etag":null,"topics":["blank","rbs","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/sampersand.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-20T18:06:54.000Z","updated_at":"2025-11-11T01:08:32.000Z","dependencies_parsed_at":"2025-10-20T20:20:47.010Z","dependency_job_id":"2a39fcaa-d758-4d87-bad1-964a0f22de93","html_url":"https://github.com/sampersand/blankity","commit_stats":null,"previous_names":["sampersand/blankity"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sampersand/blankity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampersand%2Fblankity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampersand%2Fblankity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampersand%2Fblankity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampersand%2Fblankity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sampersand","download_url":"https://codeload.github.com/sampersand/blankity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sampersand%2Fblankity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27678892,"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","status":"online","status_checked_at":"2025-12-12T02:00:06.775Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["blank","rbs","ruby"],"created_at":"2025-12-12T07:32:20.003Z","updated_at":"2025-12-12T07:32:21.094Z","avatar_url":"https://github.com/sampersand.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Blankity\n\nBlankity is a gem that provides \"blank objects,\" which define minimal methods.\n\n## Installation\n\nInstall the gem and add to the application's Gemfile by executing:\n```bash\nbundle add blankity\n```\n\nIf bundler is not being used to manage dependencies, install the gem by executing:\n```bash\ngem install blankity\n```\n\n## Usage\n\nThe `Blankity::Blank` class `undef`s all methods (other than `__send__` and `__id__`) from `BasicObject`:\n```ruby\n# No methods are defined\nblank = Blankity::Blank.new\np defined?(blank.==)      #=\u003e nil\np defined?(blank.inspect) #=\u003e nil\n\n# Include specific `Object` methods:\nblank = Blankity::Blank.new(with: [:==])\np blank == blank #=\u003e true\n\n# Also supports blocks, which are `instance_exec`ed\np Blankity::Blank.new { def inspect = \"hi\" } #=\u003e \"hi\"\n```\n\nAlso supplied are `Blankity::ToXXX` classes, which just define the conversion methods that are used throughout Ruby's stdlib:\n```ruby\n# String#* calls `.to_int` on its argument:\np 'a' * Blankity::ToInt.new(3) #=\u003e \"aaa\"\n\n# File.exist? calls `.to_path` on its argument:\np File.exist? Blankity::ToPath.new('/tmp/foo') #=\u003e false\n\n# Array#[] accepts custom ranges:\np %w[a b c d][Blankity::Range.new(1, 3)] #=\u003e [\"b\", \"c\", \"d\"]\n\n```\n\nAs a convenience, `Blankity::To` defines these conversion methods:\n```ruby\nputs 'hello' + Blankity::To.str(' world')\n#=\u003e hello world\n\nputs 'hello'.gsub(/[eo]/, Blankity::To.hash('e' =\u003e 'E', 'o' =\u003e 'O'))\n#=\u003e hEllO\n```\n\nThe `Blankity::To` module is also a mixin!\n```ruby\nextend Blankity::To\n\nputs 'hello' + str(' world')\nexit int(0)\n\n# Let's get crazy!\nsystem(\n  hash(\n    str('HELLO', hash: true) =\u003e str('WORLD')\n  ),\n  ary(str('sh'), str('-sh')),\n  str('-c'),\n  str('echo $0 $HELLO $PWD'),\n  chdir: path('/'),\n)\n```\n\n## Development\n\nRun tests via `rake test` and `steep check`.\n\nBefore pushing new versions, make sure to run `bundle exec rbs-inline --output lib` to generate new rbs signatures, and to update the `version.rb` file.\n\n## Contributing\n\nBug reports and pull requests are welcome on GitHub at https://github.com/sampersand/blankity.\n\n## License\n\nThe gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampersand%2Fblankity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsampersand%2Fblankity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsampersand%2Fblankity/lists"}