Class: Observed::ProcObserver

Inherits:
Observer
  • Object
show all
Defined in:
lib/observed/config_builder.rb

Instance Method Summary collapse

Methods included from Configurable

#configure, #get_attribute_value, #has_attribute_value?, included

Methods included from Pluggable

included

Constructor Details

#initialize(&block) ⇒ ProcObserver

Returns a new instance of ProcObserver.



14
15
16
# File 'lib/observed/config_builder.rb', line 14

def initialize(&block)
  @block = block
end

Instance Method Details

#observe(data = nil, options = nil) ⇒ Object



17
18
19
# File 'lib/observed/config_builder.rb', line 17

def observe(data=nil, options=nil)
  @block.call data, options
end