irb(main):016:0> a={'sdfs'=>['aaa','bbb'], 'ppp'=>['aa','a']} => {"ppp"=>["aa", "a"], "sdfs"=>["aaa", "bbb"]} => ["ppp:aa,a", "sdfs:aaa,bbb"] irb(main):018:0> b=a.map { |k, v| "#{k}:#{v.join(',')}" }.join(";") => "ppp:aa,a;sdfs:aaa,bbb"
Post a Comment
No comments:
Post a Comment