Module: Spinach::Hookable

Included in:
Hooks
Defined in:
lib/spinach/hookable.rb

Overview

The hookable module includes subscription capabilities to the class in which it is included.

Take in account that while most subscription/notification mechanism work at the class level, Hookable defines hooks at the instance level - so they are not the same in all the class instances.

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary (collapse)

Class Method Details

+ (Object) included(base)



10
11
12
13
14
15
# File 'lib/spinach/hookable.rb', line 10

def self.included(base)
  base.class_eval do
    extend ClassMethods
    include InstanceMethods
  end
end