PageRenderTime 38ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/ruby-mode/Arrays/flatten_once (fla).yasnippet

http://github.com/ridgetang/snippets
Unknown | 6 lines | 6 code | 0 blank | 0 comment | 0 complexity | 0a994def0a395f8fe9144065b4b5d97e MD5 | raw file
  1. # -*- mode: snippet -*-
  2. # key: flao
  3. # contributor: Translated from TextMate Snippet
  4. # name: flatten_once()
  5. # --
  6. inject(Array.new) { |${1:arr}, ${2:a}| ${1:arr}.push(*${2:a}) }