{"id":15641898,"url":"https://github.com/pnc/matches","last_synced_at":"2025-03-29T22:14:04.557Z","repository":{"id":701065,"uuid":"346763","full_name":"pnc/matches","owner":"pnc","description":"An easy means of defining meta-methods in Ruby.","archived":false,"fork":false,"pushed_at":"2009-10-27T01:39:49.000Z","size":100,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-05T03:46:47.172Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://wiki.github.com/pnc/matches","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/pnc.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":"2009-10-23T02:15:02.000Z","updated_at":"2019-07-02T09:00:14.000Z","dependencies_parsed_at":"2022-07-05T09:42:37.319Z","dependency_job_id":null,"html_url":"https://github.com/pnc/matches","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnc%2Fmatches","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnc%2Fmatches/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnc%2Fmatches/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pnc%2Fmatches/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pnc","download_url":"https://codeload.github.com/pnc/matches/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246249219,"owners_count":20747168,"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-03T11:53:01.362Z","updated_at":"2025-03-29T22:14:03.843Z","avatar_url":"https://github.com/pnc.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"Matches – easygoing methods\n===========================\n\nMatches is an easy DSL for defining regular-expression-based methods in Ruby.\n\nStart playing with matches:\n\n    # If needed\n    sudo gem install gemcutter\n    gem tumble\n    \n    sudo gem install matches\n\nThen, in a Ruby file somewhere:\n\n    require 'rubygems'\n    require 'matches'\n    \n    class Hippo\n      def initialize\n        @verbs = []\n      end\n      \n      matches /^(\\w+)\\!$/ do |verb|\n        @verbs \u003c\u003c verb\n      end\n      \n      matches /^(\\w+)ed\\?$/ do |verb|\n        @verbs.include?(verb)\n      end\n    end\n\n    herman = Hippo.new\n    herman.fatten!\n    herman.touch!\n    \n    herman.touched?\n    ==\u003e true\n\n[Read the guide](http://wiki.github.com/pnc/matches) to learn more.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnc%2Fmatches","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpnc%2Fmatches","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpnc%2Fmatches/lists"}