mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-12-16 18:34:17 +00:00
restructuring classic snippets dir to conform to new parenting specs
This commit is contained in:
8
snippets/ruby-mode/definitions/Comp
Normal file
8
snippets/ruby-mode/definitions/Comp
Normal file
@@ -0,0 +1,8 @@
|
||||
#name : include Comparable; def <=> ... end
|
||||
#group : definitions
|
||||
# --
|
||||
include Comparable
|
||||
|
||||
def <=> other
|
||||
$0
|
||||
end
|
||||
4
snippets/ruby-mode/definitions/am
Normal file
4
snippets/ruby-mode/definitions/am
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : alias_method new, old
|
||||
#group : definitions
|
||||
# --
|
||||
alias_method :${new_name}, :${old_name}
|
||||
6
snippets/ruby-mode/definitions/cla
Normal file
6
snippets/ruby-mode/definitions/cla
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : class << self ... end
|
||||
#group : definitions
|
||||
# --
|
||||
class << ${self}
|
||||
$0
|
||||
end
|
||||
13
snippets/ruby-mode/definitions/cls
Normal file
13
snippets/ruby-mode/definitions/cls
Normal file
@@ -0,0 +1,13 @@
|
||||
#name : class ... end
|
||||
#contributor : hitesh <hitesh.jasani@gmail.com>
|
||||
#group : definitions
|
||||
# --
|
||||
class ${1:`(let ((fn (capitalize (file-name-nondirectory
|
||||
(file-name-sans-extension
|
||||
(or (buffer-file-name)
|
||||
(buffer-name (current-buffer))))))))
|
||||
(cond
|
||||
((string-match "_" fn) (replace-match "" nil nil fn))
|
||||
(t fn)))`}
|
||||
$0
|
||||
end
|
||||
6
snippets/ruby-mode/definitions/mm
Normal file
6
snippets/ruby-mode/definitions/mm
Normal file
@@ -0,0 +1,6 @@
|
||||
#name : def method_missing ... end
|
||||
#group : definitions
|
||||
# --
|
||||
def method_missing(method, *args)
|
||||
$0
|
||||
end
|
||||
4
snippets/ruby-mode/definitions/r
Normal file
4
snippets/ruby-mode/definitions/r
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : attr_reader ...
|
||||
#group : definitions
|
||||
# --
|
||||
attr_reader :
|
||||
4
snippets/ruby-mode/definitions/rw
Normal file
4
snippets/ruby-mode/definitions/rw
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : attr_accessor ...
|
||||
#group : definitions
|
||||
# --
|
||||
attr_accessor :
|
||||
4
snippets/ruby-mode/definitions/w
Normal file
4
snippets/ruby-mode/definitions/w
Normal file
@@ -0,0 +1,4 @@
|
||||
#name : attr_writer ...
|
||||
#group : definitions
|
||||
# --
|
||||
attr_writer :
|
||||
Reference in New Issue
Block a user