Class: Feroxbuster::Command::TimeSpec Private
- Inherits:
-
CommandMapper::Types::Str
- Object
- CommandMapper::Types::Str
- Feroxbuster::Command::TimeSpec
- Defined in:
- lib/feroxbuster/command.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Represents the type for the --time-limit
option.
Instance Method Summary collapse
-
#validate(value) ⇒ true, (false, String)
private
Validates the given value.
Instance Method Details
#validate(value) ⇒ true, (false, String)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Validates the given value.
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/feroxbuster/command.rb', line 23 def validate(value) valid, = super(value) unless valid return [valid, ] end value = value.to_s unless value =~ /\A\d+(?:m|s|ms|ns)\z/ return [false, "must be a number and end with 'm', 's', 'ms', or 'ns'"] end return true end |