Module: CassandraCleaner::CqlRspecNotifications::Base

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(host) ⇒ Object



7
8
9
10
11
12
13
# File 'lib/cassandra_cleaner/cql_rspec_notifications.rb', line 7

def self.included(host)
  host.class_eval do
    alias_method :execute_without_notify, :execute
    alias_method :execute, :execute_with_notify
  end

end

Instance Method Details

#notify_observers(table_name) ⇒ Object



15
16
17
18
# File 'lib/cassandra_cleaner/cql_rspec_notifications.rb', line 15

def notify_observers(table_name)
  notifiers = CassandraCleaner.rspec_notifiers
  notifiers.each{|n| n.receive(table_name)} if notifiers && table_name
end