Class: String
- Inherits:
-
Object
- Object
- String
- Defined in:
- lib/fluent/plugin/out_fields_autotype.rb
Instance Method Summary collapse
Instance Method Details
#is_i? ⇒ Boolean
2 3 4 |
# File 'lib/fluent/plugin/out_fields_autotype.rb', line 2 def is_i? /\A[-+]?\d+\z/ === self end |
#nan? ⇒ Boolean
5 6 7 |
# File 'lib/fluent/plugin/out_fields_autotype.rb', line 5 def nan? self !~ /^\s*[+-]?((\d+_?)*\d+(\.(\d+_?)*\d+)?|\.(\d+_?)*\d+)(\s*|([eE][+-]?(\d+_?)*\d+)\s*)$/ end |