Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tacky

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tacky

  • 0.4.0
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

EO principles respected here DevOps By Rultor.com We recommend RubyMine

rake Gem Version Maintainability Yard Docs Hits-of-Code License

First, install it:

$ gem install tacky

Then, use it like this:

require 'tacky'
obj = Tacky.new(obj)

That's it, all method calls will be cached. This means that only the first call of any method will actually reach your object. All consecutive calls will be intercepted by the Tacky decorator, which will return previously calculated values. The decorator keeps all values in its internal Hash.

If you want all methods of everything your methods return be cached too, you need to use "deep" caching (it's true by default):

obj = Tacky.new(obj, deep: true)

Keep in mind that Tacky is thread-safe.

How to contribute

Read these guidelines. Make sure you build is green before you contribute your pull request. You will need to have Ruby 2.3+ and Bundler installed. Then:

$ bundle update
$ bundle exec rake

If it's clean and you don't see any error messages, submit your pull request.

FAQs

Package last updated on 19 Jun 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc