Class: MetasploitDataModels::Search::Operation::Range
- Inherits:
-
Metasploit::Model::Search::Operation::Base
- Object
- Metasploit::Model::Search::Operation::Base
- MetasploitDataModels::Search::Operation::Range
- Defined in:
- app/models/metasploit_data_models/search/operation/range.rb
Overview
Search operation on a Range
.
Direct Known Subclasses
Constant Summary collapse
- SEPARATOR =
Separates beginning from end of the range.
'-'
Instance Method Summary collapse
-
#value=(formatted_value) ⇒ Range<String>
Sets
#value
to aRange
composed by separatingformatted_value
by-
.
Instance Method Details
#value=(formatted_value) ⇒ Range<String>
Sets #value
to a Range
composed by separating formatted_value
by -
.
25 26 27 28 29 30 31 32 33 34 35 |
# File 'app/models/metasploit_data_models/search/operation/range.rb', line 25 def value=(formatted_value) range_arguments = formatted_value.to_s.split(SEPARATOR, 2) begin @value = Range.new(*range_arguments) rescue ArgumentError @value = formatted_value end @value end |