Class | EventHook
In: | lib/facets/more/eventhook.rb
Parent: | Exception

# Exception-based Event Hooks

Provides an Event Hooks system designed on top of Ruby‘s built-in Exception system.

## Example

      def dothis2
        puts 'pre'
        hook :quitit
        puts 'post'
      end

      def tryit2
        begin
          puts "BEFORE"
          dothis2
          puts "AFTER"
        rescue EventHook
          event :quitit do
            puts "HERE"
          end
        end
      end

      tryit2

### Methods

call new

### Attributes

cc | [R] |
name | [R] |

### Public Class methods

new(name, cc)

### Public Instance methods

call()

[Validate]