Class: Activities::Logger::Configurator

Inherits:
Object
  • Object
show all
Defined in:
app/observers/activities/logger.rb

Instance Method Summary collapse

Constructor Details

#initialize(klass) ⇒ Configurator

Returns a new instance of Configurator.



15
16
17
# File 'app/observers/activities/logger.rb', line 15

def initialize(klass)
  @klass = klass
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method

#method_missing(name, options) ⇒ Object



19
20
21
22
# File 'app/observers/activities/logger.rb', line 19

def method_missing(name, options)
  options.assert_valid_keys :if
  @klass.activity_conditions << [name, options[:if]]
end