Class: Betterp::Configuration::ProfilingThreshold
- Inherits:
-
Object
- Object
- Betterp::Configuration::ProfilingThreshold
- Defined in:
- lib/betterp/configuration.rb
Overview
Configures colors to use for different profiling durations, defines low, medium, and high colors.
Instance Attribute Summary collapse
-
#high ⇒ Object
writeonly
Sets the attribute high.
-
#low ⇒ Object
writeonly
Sets the attribute low.
Instance Method Summary collapse
Instance Attribute Details
#high=(value) ⇒ Object
Sets the attribute high
12 13 14 |
# File 'lib/betterp/configuration.rb', line 12 def high=(value) @high = value end |
#low=(value) ⇒ Object
Sets the attribute low
12 13 14 |
# File 'lib/betterp/configuration.rb', line 12 def low=(value) @low = value end |
Instance Method Details
#color(duration) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/betterp/configuration.rb', line 14 def color(duration) return :green if low?(duration) return :yellow if medium?(duration) :red if high?(duration) end |