Skip to content

Commit

Permalink
[Ruby]Add new BlankSlate snippet using BasicObject (#3425)
Browse files Browse the repository at this point in the history
- Use BasicObject for Ruby BlankSlate since `BasicObject` is available as of Ruby v1.9[^1].
- Change tabTrigger from `cla` to `clab` since we already have some snippets triggered by `cla`
- Simplify snippet file name

[^1]: https://ruby-doc.org/core-1.9.3/BasicObject.html
  • Loading branch information
toshimaru authored Nov 23, 2024
1 parent 24eac41 commit 0bd3246
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 20 deletions.

This file was deleted.

12 changes: 12 additions & 0 deletions Ruby/Snippets/class-BlankSlate.sublime-snippet
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<snippet>
<content><![CDATA[class BlankSlate < BasicObject
def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
$0
end
end]]></content>
<tabTrigger>clab</tabTrigger>
<scope>source.ruby</scope>
<description>class BlankSlate .. initialize .. end</description>
</snippet>

0 comments on commit 0bd3246

Please sign in to comment.