Skip to content

Commit

Permalink
oops, fixed the 'cla' snippet as per previous commit comment
Browse files Browse the repository at this point in the history
  • Loading branch information
drnic committed Jun 11, 2008
1 parent 0f0d6b6 commit b6188a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion Snippets/class .. end (cla).plist
Expand Up @@ -3,7 +3,11 @@
<plist version="1.0">
<dict>
<key>content</key>
<string>class ${1:${TM_FILENAME/[[:alpha:]]+|(_)/(?1::\u$0)/g}}
<string>class ${1:`#!/usr/bin/env ruby
require 'rubygems'
require "active_support"
puts ENV['TM_FILENAME'].gsub(/\.rb$/, '').camelize.singularize
`}
$0
end</string>
<key>name</key>
Expand Down
1 change: 0 additions & 1 deletion info.plist
Expand Up @@ -456,7 +456,6 @@
<string>D121FC61-96A4-4B8F-8709-280EDA876FF3</string>
<string>488B387C-50C0-4B2D-9260-5A7E7EAF9B42</string>
<string>BF487539-8085-4FF4-8601-1AD20FABAEDC</string>
<string>A7AFEC4D-D431-4C9B-AD93-FED1059CA101</string>
<string>83EED068-8C1C-4BAF-9893-902DC00616AB</string>
<string>0CCBE04E-F4E2-4E55-9506-7DE67ACF8388</string>
<string>05DFF82C-5A29-4EBD-93FE-C165FFFB5EA8</string>
Expand Down

3 comments on commit b6188a8

@marcuswyatt
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi,

I’ve updated to the latest ruby tmbundle and are getting the following error when using the cla snippet:

class /tmp/temp_textmate.DZTURg:4: private method `gsub’ called for nil:NilClass (NoMethodError)
end

It seems to only happen when the file is not yet saved.

Cheers,
Marcus

@drnic
Copy link
Owner Author

@drnic drnic commented on b6188a8 Aug 5, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I saw that once; I guess we need check for nil

@drnic
Copy link
Owner Author

@drnic drnic commented on b6188a8 Aug 5, 2008

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I’ve fixed this now.

Please sign in to comment.