Class: Util::Json

Inherits:
Virtus::Attribute
  • Object
show all
Defined in:
lib/generators/service/install/templates/services/util/json.rb

Instance Method Summary collapse

Instance Method Details

#coerce(value) ⇒ Object



4
5
6
# File 'lib/generators/service/install/templates/services/util/json.rb', line 4

def coerce(value)
  value.is_a?(::Hash) ? value : JSON.parse(value)
end