Module: AfterDo
- Defined in:
- lib/after_do.rb,
lib/after_do/version.rb
Overview
The after_do library to add callbacks to methods in Ruby. Before using this with any class, that class has to extend the AfterDo module first e.g.
MyClass.extend AfterDo
MyClass.after :some_method do awesome_stuff end
More information at the github page: github.com/PragTob/after_do
Defined Under Namespace
Modules: Class, Instance Classes: CallbackError, NonExistingMethodError
Constant Summary collapse
- ALIAS_PREFIX =
The prefix for the copies of the original methods made by after_do
'__after_do_orig_'- VERSION =
- ::nodoc
"0.2.3"
Class Method Summary collapse
-
.extended(klazz) ⇒ Object
::nodoc::.
Class Method Details
.extended(klazz) ⇒ Object
- ::nodoc
12 13 14 15 |
# File 'lib/after_do.rb', line 12 def self.extended(klazz) klazz.send(:include, AfterDo::Instance) klazz.send(:extend, AfterDo::Class) end |