PageRenderTime 384ms CodeModel.GetById 182ms app.highlight 1ms RepoModel.GetById 200ms 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# --
 6class ${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	
11	
12end