PageRenderTime 44ms CodeModel.GetById 19ms app.highlight 4ms RepoModel.GetById 16ms app.codeStats 1ms

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

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