PageRenderTime 172ms CodeModel.GetById 80ms app.highlight 1ms RepoModel.GetById 89ms app.codeStats 0ms

/ruby-mode/Classes and Modules/module .. ClassMethods .. end.yasnippet

http://github.com/ridgetang/snippets
Unknown | 19 lines | 16 code | 3 blank | 0 comment | 0 complexity | 32748a44d0dc8e9812b40d22483412db MD5 | raw file
 1# -*- mode: snippet -*-
 2# key: mod
 3# contributor: Translated from TextMate Snippet
 4# name: module .. ClassMethods .. end
 5# --
 6module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
 7	module ClassMethods
 8		$0
 9	end
10	
11	module InstanceMethods
12		
13	end
14	
15	def self.included(receiver)
16		receiver.extend         ClassMethods
17		receiver.send :include, InstanceMethods
18	end
19end