Module: Arachni::Support::Mixins::Observable::ClassMethods

Defined in:
lib/arachni/support/mixins/observable.rb

Instance Method Summary collapse

Instance Method Details



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/arachni/support/mixins/observable.rb', line 37

def advertise( *ad_events )
    ad_events.each do |event|
        define_method event do |&block|
            add_observer( event, &block )
        end

        define_method "notify_#{event}" do |*args|
            notify_observers( event, *args )
        end

        private "notify_#{event}"
    end

    nil
end