Module: Wazowski::ActiveRecordAdapter
- Defined in:
- lib/wazowski/active_record_adapter.rb
Defined Under Namespace
Modules: TransactionState, WatchDog
Class Method Summary collapse
Class Method Details
.register_node(node_id, observed_hierarchy) ⇒ Object
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
# File 'lib/wazowski/active_record_adapter.rb', line 189 def self.register_node(node_id, observed_hierarchy) observed_hierarchy.each do |klass, attrs| klass.send(:include, WatchDog) unless klass.included_modules.include?(WatchDog) if attrs.size == 1 && attrs[0] == :none klass.__wazowski_track_base!(node_id) elsif attrs.size == 1 && attrs[0] == :any klass.__wazowski_track_any!(node_id) else attrs.each do |attr| klass.__wazowski_track_on!(attr, node_id) end end end end |