Module: Vigilem::Core::Hooks::Inheritable

Included in:
Vigilem::Core::Hooks
Defined in:
lib/vigilem/core/hooks/inheritable.rb

Instance Method Summary collapse

Instance Method Details

#hooksArray

Returns:

  • (Array)


17
18
19
# File 'lib/vigilem/core/hooks/inheritable.rb', line 17

def hooks
  @hooks ||= (self.superclass.respond(:hooks) || []).select(&:inheritable?)
end

#inherited(base) ⇒ Object

Parameters:

  • base


11
12
13
# File 'lib/vigilem/core/hooks/inheritable.rb', line 11

def inherited(base)
  base.extend Inheritable
end