lectures.alex.balgavy.eu

Lecture notes from university.
git clone git://git.alex.balgavy.eu/lectures.alex.balgavy.eu.git
Log | Files | Refs | Submodules

service_object.sublime-snippet (364B)


      1 <snippet>
      2 <content><![CDATA[class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
      3 	def self.call(*args)
      4 		new(*args).call
      5 	end
      6 
      7 	def initialize(${2:options})
      8 		@${2/,\s*/, @/g} = $2
      9 	end
     10 
     11 	def call
     12 		$0
     13 	end
     14 end]]>
     15 </content>
     16 	<tabTrigger>cla</tabTrigger>
     17 	<scope>source.ruby</scope>
     18 	<description>Service Object skeleton</description>
     19 </snippet>