Class: ReactiveObservers::DatabaseAdapters::AbstractAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/reactive_observers/database_adapters/abstract_adapter.rb

Direct Known Subclasses

PostgreSQLAdapter

Instance Method Summary collapse

Constructor Details

#initialize(configuration, klasses) ⇒ AbstractAdapter

Returns a new instance of AbstractAdapter.



6
7
8
9
# File 'lib/reactive_observers/database_adapters/abstract_adapter.rb', line 6

def initialize(configuration, klasses)
  @configuration = configuration
  @klasses = klasses
end

Instance Method Details

#start_listeningObject



11
12
13
# File 'lib/reactive_observers/database_adapters/abstract_adapter.rb', line 11

def start_listening
  @klasses.each { |klass| create_listening_job_for klass }
end

#stop_listeningObject



15
16
17
# File 'lib/reactive_observers/database_adapters/abstract_adapter.rb', line 15

def stop_listening
  @klasses.each { |klass| stop_listening_job_for klass }
end