Class: Logux::ActionWatcher

Inherits:
Object
  • Object
show all
Defined in:
lib/logux/action_watcher.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ActionWatcher

Returns a new instance of ActionWatcher.

Raises:

  • (ArgumentError)


11
12
13
14
15
# File 'lib/logux/action_watcher.rb', line 11

def initialize(options = {})
  raise ArgumentError, :options unless options.is_a?(Hash)

  @options = options
end

Instance Attribute Details

#optionsObject (readonly)

Returns the value of attribute options.



9
10
11
# File 'lib/logux/action_watcher.rb', line 9

def options
  @options
end

Class Method Details

.call(options = {}, &block) ⇒ Object



5
6
7
# File 'lib/logux/action_watcher.rb', line 5

def self.call(options = {}, &block)
  new(options).call(&block)
end

Instance Method Details

#callObject



17
18
19
# File 'lib/logux/action_watcher.rb', line 17

def call
  yield
end