class-..-instance_methods-..-undef-..-initialize-..-end-(class).sublime-snippet (507B)
1 <snippet> 2 <content><![CDATA[class ${1:BlankSlate} 3 instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ } 4 5 def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/} 6 @${3:delegate} = ${4:delegate_object} 7 8 $0 9 end 10 11 def method_missing(meth, *args, &block) 12 @${3:delegate}.send(meth, *args, &block) 13 end 14 15 16 end]]></content> 17 <tabTrigger>cla</tabTrigger> 18 <scope>source.ruby</scope> 19 <description>class BlankSlate .. initialize .. end</description> 20 </snippet>