Module: Overridable
- Defined in:
- lib/overridable.rb
Overview
Including this module in your class will give your class the ability to make its methods to be overridable by included modules. Let’s look at some examples for easier understanding. You are not just limited to write a brandnew method, but also call the original method by ‘super`. Thanks to this feature, you don’t need method chains any more! ;)
You can also use Overridable::ModuleMixin to make things even a bit easier for some situations. See Overridable::ModuleMixin for details.
Defined Under Namespace
Modules: ClassMethods, ModuleMixin
Class Method Summary collapse
-
.included(mod) ⇒ Object
:nodoc:.
Class Method Details
.included(mod) ⇒ Object
:nodoc:
135 136 137 |
# File 'lib/overridable.rb', line 135 def self.included mod #:nodoc: mod.extend ClassMethods end |