home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / usr / share / gedit-2 / plugins / snippets / ruby.xml < prev    next >
Encoding:
Extensible Markup Language  |  2006-08-27  |  4.3 KB  |  167 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <snippets language="Ruby">
  3.   <snippet id="forin">
  4.     <text><![CDATA[for ${1:element} in ${2:collection}
  5.     ${1:element}.$0
  6. end]]></text>
  7.     <description>for .. in .. end</description>
  8.     <tag>forin</tag>
  9.   </snippet>
  10.   <snippet id="inject">
  11.     <text><![CDATA[inject(${1:object}) { |${2:injection}, ${3:element}| $0 }]]></text>
  12.     <description>inject object</description>
  13.     <tag>inject</tag>
  14.   </snippet>
  15.   <snippet id="reject">
  16.     <text><![CDATA[reject { |${1:element}| ${1:element}.$0 }]]></text>
  17.     <description>reject element</description>
  18.     <tag>reject</tag>
  19.   </snippet>
  20.   <snippet id="select">
  21.     <text><![CDATA[select { |${1:element}| ${1:element}.$0 }]]></text>
  22.     <description>select element</description>
  23.     <tag>select</tag>
  24.   </snippet>
  25.   <snippet id="ife">
  26.     <text><![CDATA[if ${1:condition}
  27.     $2
  28. else
  29.     $3
  30. end]]></text>
  31.     <description>if .. else .. end</description>
  32.     <tag>ife</tag>
  33.   </snippet>
  34.   <snippet id="if">
  35.     <text><![CDATA[if ${1:condition}
  36.     $0
  37. end]]></text>
  38.     <description>if .. end</description>
  39.     <tag>if</tag>
  40.   </snippet>
  41.   <snippet id="case">
  42.     <text><![CDATA[case ${1:object}
  43.     when ${2:condition}
  44.         $0
  45. end]]></text>
  46.     <description>case .. end</description>
  47.     <tag>case</tag>
  48.   </snippet>
  49.   <snippet id="begin">
  50.     <text><![CDATA[begin
  51.     $1
  52. rescue ${2:Exception} => ${3:e}
  53.     $0
  54. end]]></text>
  55.     <description>begin .. rescue .. end</description>
  56.     <tag>begin</tag>
  57.   </snippet>
  58.   <snippet id="class">
  59.     <text><![CDATA[class ${1:class_name}
  60.     $0
  61. end]]></text>
  62.     <description>class .. end</description>
  63.     <tag>class</tag>
  64.   </snippet>
  65.   <snippet id="collecto">
  66.     <text><![CDATA[collect do |${1:element}|
  67.     ${1:element}.$0
  68. end]]></text>
  69.     <description>collect element do</description>
  70.     <tag>collecto</tag>
  71.   </snippet>
  72.   <snippet id="collect">
  73.     <text><![CDATA[collect { |${1:element}| ${1:element}.$0 }]]></text>
  74.     <description>collect element</description>
  75.     <tag>collect</tag>
  76.   </snippet>
  77.   <snippet id="def">
  78.     <text><![CDATA[def ${1:method_name}
  79.     $0
  80. end]]></text>
  81.     <description>def .. end</description>
  82.     <tag>def</tag>
  83.   </snippet>
  84.   <snippet id="do">
  85.     <text><![CDATA[do
  86.     $0
  87. end]]></text>
  88.     <description>do .. end</description>
  89.     <tag>do</tag>
  90.   </snippet>
  91.   <snippet id="doo">
  92.     <text><![CDATA[do |${1:object}|
  93.     $0
  94. end]]></text>
  95.     <description>do |object| .. end</description>
  96.     <tag>doo</tag>
  97.   </snippet>
  98.   <snippet id="eacho">
  99.     <text><![CDATA[each do |${1:element}|
  100.     ${1:element}.$0
  101. end]]></text>
  102.     <description>each element do</description>
  103.     <tag>eacho</tag>
  104.   </snippet>
  105.   <snippet id="each">
  106.     <text><![CDATA[each { |${1:element}| ${1:element}.$0 }]]></text>
  107.     <description>each element</description>
  108.     <tag>each</tag>
  109.   </snippet>
  110.   <snippet id="each_with_indexo">
  111.     <text><![CDATA[each_with_index do |${1:element}, ${2:idx}|
  112.     ${1:element}.$0
  113. end]]></text>
  114.     <description>each_with_index do</description>
  115.     <tag>eachwithindexo</tag>
  116.   </snippet>
  117.   <snippet id="each_with_index">
  118.     <text><![CDATA[each_with_index { |${1:element}, ${2:idx}| ${1:element}.$0 }]]></text>
  119.     <description>each_with_index</description>
  120.     <tag>eachwithindex</tag>
  121.   </snippet>
  122.   <snippet id=":">
  123.     <text><![CDATA[:${1:key} => ${2:"value"}${3:, }]]></text>
  124.     <description>hash pair</description>
  125.     <tag>:</tag>
  126.   </snippet>
  127.   <snippet id="hashpointer">
  128.     <text><![CDATA[ => ]]></text>
  129.     <accelerator><![CDATA[<Shift><Alt>l]]></accelerator>
  130.     <description>hash pointer</description>
  131.   </snippet>
  132.   <snippet id="injecto">
  133.     <text><![CDATA[inject(${1:object}) do |${2:injection}, ${3:element}| 
  134.     $0
  135. end]]></text>
  136.     <description>inject object do</description>
  137.     <tag>injecto</tag>
  138.   </snippet>
  139.   <snippet id="rejecto">
  140.     <text><![CDATA[reject do |${1:element}| 
  141.     ${1:element}.$0
  142. end]]></text>
  143.     <description>reject element do</description>
  144.     <tag>rejecto</tag>
  145.   </snippet>
  146.   <snippet id="selecto">
  147.     <text><![CDATA[select do |${1:element}|
  148.     ${1:element}.$0
  149. end]]></text>
  150.     <description>select element do</description>
  151.     <tag>selecto</tag>
  152.   </snippet>
  153.   <snippet id="unless">
  154.     <text><![CDATA[unless ${1:condition}
  155.     $0
  156. end]]></text>
  157.     <description>unless</description>
  158.     <tag>unless</tag>
  159.   </snippet>
  160.   <snippet id="when">
  161.     <text><![CDATA[when ${1:condition}
  162.     $0]]></text>
  163.     <description>when</description>
  164.     <tag>when</tag>
  165.   </snippet>
  166. </snippets>
  167.