Module: Doing::Hooks
- Defined in:
- lib/doing/hooks.rb
Overview
Hook manager
Constant Summary collapse
- DEFAULT_PRIORITY =
- 20
Class Method Summary collapse
- .insert_hook(event, priority, &block) ⇒ Object
- 
  
    
      .priority_value(priority)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Ensure the priority is a Fixnum. 
- 
  
    
      .register(event, priority: DEFAULT_PRIORITY, &block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    register hook(s) to be called later, public API. 
- 
  
    
      .register_one(event, priority, &block)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    register a single hook to be called later, internal API. 
- .trigger(event, *args) ⇒ Object
Class Method Details
.insert_hook(event, priority, &block) ⇒ Object
.priority_value(priority) ⇒ Object
Ensure the priority is a Fixnum
.register(event, priority: DEFAULT_PRIORITY, &block) ⇒ Object
register hook(s) to be called later, public API
.register_one(event, priority, &block) ⇒ Object
register a single hook to be called later, internal API