Guest User

Untitled

a guest
Aug 18th, 2018
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. if object.is_a?(Hash)
  2. object.each do |k,v|
  3. else
  4. object.each do |a|
  5. if v.is_a?(Array)
  6. make_content_for_csv(v, k)
  7. else
  8. if index
  9. instance_variable_get("@#{index}") << "#{k} => #{v.inspect}"
  10. else
  11. @values << v
  12. end
  13. end
  14. end
  15. else
Add Comment
Please, Sign In to add comment