Class: LogMethod::Config

Inherits:
Object
  • Object
show all
Defined in:
lib/log_method/config.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfig

Returns a new instance of Config.



8
9
10
# File 'lib/log_method/config.rb', line 8

def initialize
  reset!
end

Instance Attribute Details

#after_log_procsObject (readonly)

Returns the value of attribute after_log_procs.



2
3
4
# File 'lib/log_method/config.rb', line 2

def after_log_procs
  @after_log_procs
end

#current_actor_id_labelObject

Returns the value of attribute current_actor_id_label.



3
4
5
# File 'lib/log_method/config.rb', line 3

def current_actor_id_label
  @current_actor_id_label
end

#current_actor_procObject

Returns the value of attribute current_actor_proc.



3
4
5
# File 'lib/log_method/config.rb', line 3

def current_actor_proc
  @current_actor_proc
end

#external_identifier_methodObject

Returns the value of attribute external_identifier_method.



3
4
5
# File 'lib/log_method/config.rb', line 3

def external_identifier_method
  @external_identifier_method
end

#trace_id_procObject

Returns the value of attribute trace_id_proc.



3
4
5
# File 'lib/log_method/config.rb', line 3

def trace_id_proc
  @trace_id_proc
end

Instance Method Details

#after_log_proc=(proc_or_array) ⇒ Object



20
21
22
# File 'lib/log_method/config.rb', line 20

def after_log_proc=(proc_or_array)
  @after_log_procs = Array(proc_or_array)
end

#reset!Object



12
13
14
15
16
17
18
# File 'lib/log_method/config.rb', line 12

def reset!
  @after_log_procs            = []
  @current_actor_id_label     = "current_actor_id"
  @current_actor_proc         = NO_OP
  @external_identifier_method = nil
  @trace_id_proc              = NO_OP
end