PageRenderTime 144ms CodeModel.GetById 81ms app.highlight 4ms RepoModel.GetById 56ms app.codeStats 0ms

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

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