Method: OpenC3::ConfigParser.handle_nil
- Defined in:
- lib/openc3/config/config_parser.rb
.handle_nil(value) ⇒ nil|Object
Converts a String containing ”, ‘NIL’ or ‘NULL’ to nil Ruby primitive. All other arguments are simply returned.
275 276 277 278 279 280 281 282 283 |
# File 'lib/openc3/config/config_parser.rb', line 275 def self.handle_nil(value) if String === value case value.upcase when '', 'NIL', 'NULL' return nil end end return value end |