Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if object.is_a?(Hash)
- object.each do |k,v|
- else
- object.each do |a|
- if v.is_a?(Array)
- make_content_for_csv(v, k)
- else
- if index
- instance_variable_get("@#{index}") << "#{k} => #{v.inspect}"
- else
- @values << v
- end
- end
- end
- else
Add Comment
Please, Sign In to add comment