Class: TestProf::FactoryDoctor::Configuration

Inherits:
Object
  • Object
show all
Defined in:
lib/test_prof/factory_doctor.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeConfiguration

Returns a new instance of Configuration.



44
45
46
47
48
49
# File 'lib/test_prof/factory_doctor.rb', line 44

def initialize
  # event to track for DB interactions
  @event = ENV.fetch("FDOC_EVENT", "sql.active_record")
  # consider result good if time wasted less then threshold
  @threshold = ENV.fetch("FDOC_THRESHOLD", "0.01").to_f
end

Instance Attribute Details

#eventObject

Returns the value of attribute event.



42
43
44
# File 'lib/test_prof/factory_doctor.rb', line 42

def event
  @event
end

#thresholdObject

Returns the value of attribute threshold.



42
43
44
# File 'lib/test_prof/factory_doctor.rb', line 42

def threshold
  @threshold
end