View array.rb
def self.flatten(array) | |
array.to_s.gsub(/[\[\]]/,'').split(/\s*,\s*/).map { |x| x.to_i } | |
end |