Socket
Book a DemoInstallSign in
Socket

decorate

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decorate

0.3.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

= decorate

Homepage:: http://github.com/lang/decorate

== Description

Python style decorators for Ruby, some common decorators like private_method are provided out of the box.

Decorators that come with the decorate library:

  • Decorate::PrivateMethod
  • Decorate::ProtectedMethod
  • Decorate::PublicMethod
  • Decorate::ModuleMethod
  • Decorate::Memoize

Helpers to create your own decorators:

  • Decorate::AroundDecorator
  • Decorate::BeforeDecorator

== Hygiene issues

Decorate hooks into (aka redefines) Module#method_added and Object#singleton_method_added via the classic alias/delegate pattern. If you override these methods in one of your classes that use decorators, make sure to call +super+, otherwise decorate breaks.

Also, private_method, protected_method, public_method and module_method are defined as private methods of Module, but only if the respective files are required.

== License

Decorate is licensed under the same terms as the main Ruby implementation. See http://www.ruby-lang.org/en/LICENSE.txt.

FAQs

Package last updated on 31 Jan 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

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.