Method: Dropbox::Sign::SubSigningOptions#_to_hash

Defined in:
lib/dropbox-sign/models/sub_signing_options.rb

#_to_hash(value, include_nil = true) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value



330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/dropbox-sign/models/sub_signing_options.rb', line 330

def _to_hash(value, include_nil = true)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v, include_nil) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v, include_nil) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash(include_nil)
  else
    value
  end
end