Class: Metasploit::Model::Search::Operation::Boolean
- Defined in:
- app/models/metasploit/model/search/operation/boolean.rb
Overview
Search operation with Metasploit::Model::Search::Operation::Base#operator with #type
:boolean
. Validates that
value is a proper boolean (false
or true
) or the String
version of either.
Constant Summary collapse
- FORMATTED_VALUE_TO_VALUE =
Take a String formatted Metasploit::Model::Search::Operation::Base#value and returns its unformatted value for validation.
{ 'false' => false, 'true' => true }
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#value=(formatted_value) ⇒ false, ...
Sets Metasploit::Model::Search::Operation::Base#value by type casting String boolean to actual
false
ortrue
.
Methods inherited from Base
Methods inherited from Base
Constructor Details
This class inherits a constructor from Metasploit::Model::Base
Instance Method Details
#value=(formatted_value) ⇒ false, ...
Sets Metasploit::Model::Search::Operation::Base#value by type casting String boolean to actual false
or true
.
33 34 35 |
# File 'app/models/metasploit/model/search/operation/boolean.rb', line 33 def value=(formatted_value) @value = FORMATTED_VALUE_TO_VALUE.fetch(formatted_value, formatted_value) end |