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.



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

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.



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

def event
  @event
end

#thresholdObject

Returns the value of attribute threshold.



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

def threshold
  @threshold
end