class WellKnown::Hooks::Registry
Attributes
hooks[RW]
Public Class Methods
instance()
click to toggle source
# File lib/well_known/hooks.rb, line 58 def self.instance @instance ||= new end
new()
click to toggle source
# File lib/well_known/hooks.rb, line 62 def initialize @hooks = {} end
Public Instance Methods
[](name)
click to toggle source
# File lib/well_known/hooks.rb, line 66 def [](name) @hooks[name] end
register(name, &action)
click to toggle source
# File lib/well_known/hooks.rb, line 70 def register(name, &action) @hooks[name] ||= [] @hooks[name] << action.to_proc end