Module: Stealth::Controller::DynamicDelay
- Extended by:
- ActiveSupport::Concern
- Included in:
- Stealth::Controller
- Defined in:
- lib/stealth/controller/dynamic_delay.rb
Constant Summary collapse
- SHORT_DELAY =
3.0
- STANDARD_DELAY =
4.3
- LONG_DELAY =
7.0
Instance Method Summary collapse
Instance Method Details
#calculate_delay_from_text(text) ⇒ Object
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/stealth/controller/dynamic_delay.rb', line 49 def calculate_delay_from_text(text) case text.size when 0..55 SHORT_DELAY when 56..140 STANDARD_DELAY when 141..256 STANDARD_DELAY * 1.5 else LONG_DELAY end end |