Class: ReactiveObservers::Configuration

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



8
9
10
# File 'lib/reactive_observers/configuration.rb', line 8

def initialize
  reset!
end

Instance Attribute Details

#default_triggerObject

Returns the value of attribute default_trigger.



6
7
8
# File 'lib/reactive_observers/configuration.rb', line 6

def default_trigger
  @default_trigger
end

#listening_job_nameObject

Returns the value of attribute listening_job_name.



6
7
8
# File 'lib/reactive_observers/configuration.rb', line 6

def listening_job_name
  @listening_job_name
end

#observed_tablesObject

Returns the value of attribute observed_tables.



6
7
8
# File 'lib/reactive_observers/configuration.rb', line 6

def observed_tables
  @observed_tables
end

Instance Method Details

#reset!Object



12
13
14
15
16
# File 'lib/reactive_observers/configuration.rb', line 12

def reset!
  @listening_job_name = "%{table_name}_notices" # trigger listens for these type of notices
  @observed_tables = [] # these tables are observed at database level
  @default_trigger = :changed # default name of method that is called inside observer during notification
end