New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

method_cop

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

method_cop

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

This gem allows you to guard methods that have side effects with a callback that fires before the method is invoked. If the callback returns a "falsey" value, the method is halted and will not be called, and the result will be nil instead. if the method does not have side effects or you depend on its return value, you should NOT use this on that method! This will break the hell out of design by contract. Currently does not work with methods that accept blocks so be aware of that. Fixes, improvements, pull requests, and general "why on earth did you do this" notes are encouraged.

FAQs

Package last updated on 03 Nov 2011

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