{"id":15412544,"url":"https://github.com/elmassimo/pakiderm","last_synced_at":"2025-10-07T02:57:31.950Z","repository":{"id":14473682,"uuid":"17185858","full_name":"ElMassimo/pakiderm","owner":"ElMassimo","description":"🐘 Pakiderm will never forget the return value","archived":false,"fork":false,"pushed_at":"2021-02-24T15:21:55.000Z","size":73,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-09-25T06:32:23.946Z","etag":null,"topics":["memoization","memoize","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/ElMassimo.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2014-02-25T19:47:58.000Z","updated_at":"2021-08-20T11:09:38.000Z","dependencies_parsed_at":"2022-09-13T18:13:26.311Z","dependency_job_id":null,"html_url":"https://github.com/ElMassimo/pakiderm","commit_stats":null,"previous_names":["elmassimo/simple_memoizer"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/ElMassimo/pakiderm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fpakiderm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fpakiderm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fpakiderm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fpakiderm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ElMassimo","download_url":"https://codeload.github.com/ElMassimo/pakiderm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ElMassimo%2Fpakiderm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278712683,"owners_count":26032741,"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-10-07T02:00:06.786Z","response_time":59,"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":["memoization","memoize","ruby"],"created_at":"2024-10-01T16:53:40.601Z","updated_at":"2025-10-07T02:57:31.916Z","avatar_url":"https://github.com/ElMassimo.png","language":"Ruby","readme":"Pakiderm [![Gem Version](https://badge.fury.io/rb/pakiderm.svg)](https://rubygems.org/gems/pakiderm) [![Build Status](https://github.com/ElMassimo/pakiderm/workflows/build/badge.svg)](https://github.com/ElMassimo/pakiderm/actions) [![Test Coverage](https://codeclimate.com/github/ElMassimo/pakiderm/badges/coverage.svg)](https://codeclimate.com/github/ElMassimo/pakiderm) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/ElMassimo/queryable/blob/master/LICENSE.txt)\n=====================\n\nAllows you to unobtrusively memoize methods without parameters.\n\n```ruby\nclass Stopwatch\n  extend Pakiderm\n\n  def start\n    @started_at = Time.now\n  end\n\n  def stop\n    elapsed_time\n  end\n\n  memoize \\\n  def elapsed_time\n    Time.now - @started_at\n  end\nend\n```\nMemoized methods will only be called the first time; the result will be stored and returned on subsequent invocations.\n```ruby\nstopwatch = Stopwatch.new\nstopwatch.start\nstopwatch.stop         # Example: 3.991826\nstopwatch.elapsed_time #       =\u003e 3.991826\n```\nYou can also pass a list of methods that should be memoized:\n```ruby\nmemoize :complex_calculation, :api_response, :db_query\n```\n\n## Background\nPakiderm adds a method by using `Module#prepend` in order to\"intercept\" calls to the original method and provide memoization.\n\n### Caveat\nIf you override the method in a subclass, Pakiderm's method won't be able to intercept calls to the subclass' method, so you would need to call `memoize` again in the subclass.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felmassimo%2Fpakiderm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felmassimo%2Fpakiderm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felmassimo%2Fpakiderm/lists"}