class Raze

main module of raze

Public Class Methods

flatten(collection) click to toggle source
# File lib/raze.rb, line 3
def self.flatten(collection)
  if collection.class == Hash
    flatten(collection.flatten)
  elsif collection.class == Array
    collection.map do |child|
      flatten(child)
    end.flatten
  else
    collection
  end
end