SkillAgentSearch skills...

Override

Like #alias_method_chain, but awesome

Install / Use

/learn @mynyml/Override
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

=== Summary

Allows using the 'super' keyword with methods previously defined in reopened classes. Simple and elegant alternative to Rails' #alias_method_chain for redefining methods while keeping access to the previous definition.

=== Install

gem install mynyml-override --source http://gemcutter.org

=== Examples

require 'override'

class Post def text @text.strip end end

class Post override :text def text super.reverse end end

Related Skills

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated6y ago
Forks0

Languages

Ruby

Security Score

70/100

Audited on Aug 13, 2019

No findings