Module: Isono::NodeModules::Base::ClassMethods
- Defined in:
- lib/isono/node_modules/base.rb
Instance Method Summary collapse
- #after_close_hook(&blk) ⇒ Object
- #after_connect_hook(&blk) ⇒ Object
- #before_close_hook(&blk) ⇒ Object
- #before_connect_hook(&blk) ⇒ Object
- #config_section(name = nil, &blk) ⇒ Object
- #initialize_hook(&blk) ⇒ Object
- #node_hooks ⇒ Object
- #terminate_hook(&blk) ⇒ Object
Instance Method Details
#after_close_hook(&blk) ⇒ Object
53 54 55 |
# File 'lib/isono/node_modules/base.rb', line 53 def after_close_hook(&blk) @node_hooks[:after_close] = blk end |
#after_connect_hook(&blk) ⇒ Object
45 46 47 |
# File 'lib/isono/node_modules/base.rb', line 45 def after_connect_hook(&blk) @node_hooks[:after_connect] = blk end |
#before_close_hook(&blk) ⇒ Object
49 50 51 |
# File 'lib/isono/node_modules/base.rb', line 49 def before_close_hook(&blk) @node_hooks[:before_close] = blk end |
#before_connect_hook(&blk) ⇒ Object
41 42 43 |
# File 'lib/isono/node_modules/base.rb', line 41 def before_connect_hook(&blk) @node_hooks[:before_connect] = blk end |
#config_section(name = nil, &blk) ⇒ Object
57 58 59 60 |
# File 'lib/isono/node_modules/base.rb', line 57 def config_section(name=nil, &blk) @config_section_name = name unless name.nil? @config_section_builder = blk end |
#initialize_hook(&blk) ⇒ Object
33 34 35 |
# File 'lib/isono/node_modules/base.rb', line 33 def initialize_hook(&blk) @node_hooks[:initialize] = blk end |
#node_hooks ⇒ Object
62 63 64 |
# File 'lib/isono/node_modules/base.rb', line 62 def node_hooks @node_hooks end |
#terminate_hook(&blk) ⇒ Object
37 38 39 |
# File 'lib/isono/node_modules/base.rb', line 37 def terminate_hook(&blk) @node_hooks[:terminate] = blk end |