-
Notifications
You must be signed in to change notification settings - Fork 3
Enabling Features
mosop edited this page Nov 23, 2016
·
8 revisions
Callback.enable
defines a callback!
macro method into a specified class. The callback! method enables the class to use the callback features.
require "callback"
Callback.enable Reference
class MyClass
callback!
end
You can also limit the scope.
require "callback"
class MyClass
Callback.enable
callback!
end
class AnotherClass
callback! # raises a compile error
end