Class: TestProf::FactoryDoctor::Configuration
- Inherits:
-
Object
- Object
- TestProf::FactoryDoctor::Configuration
- Defined in:
- lib/test_prof/factory_doctor.rb
Instance Attribute Summary collapse
-
#event ⇒ Object
Returns the value of attribute event.
-
#threshold ⇒ Object
Returns the value of attribute threshold.
Instance Method Summary collapse
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
Constructor Details
#initialize ⇒ Configuration
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
#event ⇒ Object
Returns the value of attribute event.
42 43 44 |
# File 'lib/test_prof/factory_doctor.rb', line 42 def event @event end |
#threshold ⇒ Object
Returns the value of attribute threshold.
42 43 44 |
# File 'lib/test_prof/factory_doctor.rb', line 42 def threshold @threshold end |