Method: SimpleClient::Signature#jsonify
- Defined in:
- lib/simple/signature.rb
#jsonify(model) ⇒ Object
32 33 34 35 36 37 38 39 40 41 |
# File 'lib/simple/signature.rb', line 32 def jsonify(model) return model if model.nil? || model.is_a?(String) local_body = nil if model.is_a?(Array) local_body = model.map{|m| object_to_hash(m) } else local_body = object_to_hash(model) end local_body.to_json end |