Class: Fluent::OjOptions
- Inherits:
-
Object
- Object
- Fluent::OjOptions
- Defined in:
- lib/fluent/oj_options.rb
Constant Summary collapse
- OPTIONS =
{ 'bigdecimal_load': :symbol, 'max_nesting': :integer, 'mode': :symbol, 'use_to_json': :bool }
- ALLOWED_VALUES =
{ 'bigdecimal_load': %i[bigdecimal float auto], 'mode': %i[strict null compat json rails object custom] }
- DEFAULTS =
{ 'bigdecimal_load': :float, 'mode': :compat, 'use_to_json': true }
- @@available =
false
Class Method Summary collapse
Class Method Details
.available? ⇒ Boolean
25 26 27 |
# File 'lib/fluent/oj_options.rb', line 25 def self.available? @@available end |
.load_env ⇒ Object
29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/fluent/oj_options.rb', line 29 def self.load_env = self. begin require 'oj' Oj. = @@available = true rescue LoadError @@available = false end end |