PageRenderTime 3ms CodeModel.GetById 1ms app.highlight 1ms RepoModel.GetById 0ms app.codeStats 1ms

/ruby-mode/Classes and Modules/class .. < DelegateClass .. initialize .. end (class).yasnippet

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