Class: EnvironmentConfig::Types::Json
- Inherits:
-
Object
- Object
- EnvironmentConfig::Types::Json
- Defined in:
- lib/environment_config/types/json.rb
Class Method Summary collapse
Class Method Details
.convert(value) ⇒ Object
13 14 15 16 17 18 |
# File 'lib/environment_config/types/json.rb', line 13 def convert(value) return value if value.is_a?(Array) || value.is_a?(Hash) return nil if value.empty? JSON.parse(value) end |
.name ⇒ Object
9 10 11 |
# File 'lib/environment_config/types/json.rb', line 9 def name :json end |