--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: This adds a new hook type. It will define both a class method that you can use to add hooks, as well as an instance method that you can use to call all hooks of that type. The class method can be called with a symbol or a block or both. If a block is given and and symbol is not, it adds the hook block to the hook type. If a block and symbol are both given, it replaces the hook block associated with that symbol for a given hook type, or adds it if there is no hook block with that symbol for that hook type. If no block is given, it assumes the symbol specifies an instance method to call and adds it to the hook type.
- !ruby/struct:SM::Flow::P 
  body: If any hook block returns false, the instance method will return false immediately without running the rest of the hooks of that type.
- !ruby/struct:SM::Flow::P 
  body: It is recommended that you always provide a symbol to this method, for descriptive purposes. It's only necessary to do so when you are using a system that reloads code.
- !ruby/struct:SM::Flow::P 
  body: "Example of usage:"
- !ruby/struct:SM::Flow::VERB 
  body: " class MyModel\n  define_hook :before_move_to\n  before_move_to(:check_move_allowed){|o| o.allow_move?}\n  def move_to(there)\n    return if before_move_to == false\n    # move MyModel object to there\n  end\n end\n"
full_name: Sequel::Plugins::HookClassMethods::ClassMethods#add_hook_type
is_singleton: false
name: add_hook_type
params: (*hooks)
visibility: public
