PageRenderTime 31ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/ruby-mode/Classes and Modules/class .. < ParentClass .. initialize .. end.yasnippet

http://github.com/ridgetang/snippets
Unknown | 12 lines | 10 code | 2 blank | 0 comment | 0 complexity | 8a73c1bb64913f9e5665cf354d11b572 MD5 | raw file
  1. # -*- mode: snippet -*-
  2. # key: cla
  3. # contributor: Translated from TextMate Snippet
  4. # name: class .. < ParentClass .. initialize .. end
  5. # --
  6. class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < ${2:ParentClass}
  7. def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
  8. $0
  9. end
  10. end