Skip to content

Commit

Permalink
Adding singleton class snippets.
Browse files Browse the repository at this point in the history
git-svn-id: http://macromates.com/svn/Bundles/trunk/Bundles/Ruby.tmbundle@3684 dfb7d73b-c2ec-0310-8fea-fb051d288c6d
  • Loading branch information
JEG2 authored and JEG2 committed Jun 16, 2006
1 parent 77d64b2 commit a7c0c12
Show file tree
Hide file tree
Showing 4 changed files with 40 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Commands/Run Rake Task.tmCommand
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ if rake.nil?
exit 206
end
Dir.chdir(ENV["TM_PROJECT_DIRECTORY"])
Dir.chdir(ENV["TM_PROJECT_DIRECTORY"] || ENV["TM_DIRECTORY"])
tasks = `#{rake} --tasks`
unless $?.exited?
Expand Down Expand Up @@ -54,7 +54,7 @@ if selection.first == "1"
<body>
<div id="script_output" class="framed">
<pre><strong>RakeMate r#{RAKEMATE_VERSION} running Ruby v#{RUBY_VERSION}.</strong>
<strong>>>> #{ENV["TM_PROJECT_DIRECTORY"]}</strong>
<strong>>>> #{Dir.pwd}</strong>
<div id="actual_output" style="-khtml-line-break: after-white-space;">
START_HTML
open("|#{rake} #{task} 2>&1") do |output|
Expand Down
18 changes: 18 additions & 0 deletions Snippets/class << self __ end.tmSnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>class &lt;&lt; ${1:self}
$0
end</string>
<key>name</key>
<string>class &lt;&lt; self .. end</string>
<key>scope</key>
<string>source.ruby</string>
<key>tabTrigger</key>
<string>cla</string>
<key>uuid</key>
<string>C7AAAE45-487A-4B61-8962-D47675AAC05F</string>
</dict>
</plist>
16 changes: 16 additions & 0 deletions Snippets/singleton_class().tmSnippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>content</key>
<string>class &lt;&lt; self; self end</string>
<key>name</key>
<string>singleton_class()</string>
<key>scope</key>
<string>source.ruby</string>
<key>tabTrigger</key>
<string>sin</string>
<key>uuid</key>
<string>B46D35B8-5DEB-4C10-A110-BA1965A2EB9C</string>
</dict>
</plist>
4 changes: 4 additions & 0 deletions info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
<array>
<string>2DBEE50B-3097-4A57-AB48-3586CF392D8B</string>
<string>0BA2B2F1-E767-4A03-9791-0AC0183251F1</string>
<string>B46D35B8-5DEB-4C10-A110-BA1965A2EB9C</string>
<string>97054C4D-E4A3-45B1-9C00-B82DBCB30CAD</string>
</array>
<key>name</key>
Expand Down Expand Up @@ -315,6 +316,7 @@
<string>E98FB8F9-7302-431D-8BF2-275A68A6126C</string>
<string>121B334B-2AA6-4E9A-A8B8-BF93B627982B</string>
<string>AFE1D078-EA16-45F5-AD8A-FAC1B523D861</string>
<string>C7AAAE45-487A-4B61-8962-D47675AAC05F</string>
<string>------------------------------------</string>
<string>2B73EC5F-06D2-460C-A14F-6FA05AFCF0CC</string>
<string>0E85EC81-2FAB-4648-B590-119CC1BB6E41</string>
Expand Down Expand Up @@ -424,6 +426,7 @@
<string>121B334B-2AA6-4E9A-A8B8-BF93B627982B</string>
<string>AFE1D078-EA16-45F5-AD8A-FAC1B523D861</string>
<string>0CCBE04E-F4E2-4E55-9506-7DE67ACF8388</string>
<string>C7AAAE45-487A-4B61-8962-D47675AAC05F</string>
<string>05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8</string>
<string>31D1F145-33AB-4441-BA11-4D1C46928C4C</string>
<string>BF487539-8085-4FF4-8601-1AD20FABAEDC</string>
Expand Down Expand Up @@ -488,6 +491,7 @@
<string>F3C5F719-EF03-4FF7-A777-4A8402FE3B6B</string>
<string>66802933-B49F-479B-9DF9-1D898FF1FA90</string>
<string>4E409AA4-E7D4-46B7-A4E9-E32F992B33E9</string>
<string>B46D35B8-5DEB-4C10-A110-BA1965A2EB9C</string>
<string>9E0B4D4B-2956-4B3A-800A-3D8CE54E66BF</string>
<string>BA9440C9-36C3-4031-BB61-67B581D5B179</string>
<string>36853A11-0307-4AE7-B835-7CE6358717A5</string>
Expand Down

0 comments on commit a7c0c12

Please sign in to comment.