Class: RaceGuard::CommitSafety::WatcherDSL

Inherits:
Object
  • Object
show all
Defined in:
lib/race_guard/commit_safety/watcher.rb

Overview

Instance Method Summary collapse

Constructor Details

#initialize(watch_name) ⇒ WatcherDSL

Returns a new instance of WatcherDSL.



12
13
14
# File 'lib/race_guard/commit_safety/watcher.rb', line 12

def initialize(watch_name)
  @watch_name = watch_name.to_sym
end

Instance Method Details

#intercept(klass, method_name, scope: :auto) ⇒ Object



16
17
18
# File 'lib/race_guard/commit_safety/watcher.rb', line 16

def intercept(klass, method_name, scope: :auto)
  Watcher.install!(@watch_name, klass, method_name, scope: scope)
end