mirror of
https://github.com/joaotavora/yasnippet.git
synced 2025-10-13 21:13:04 +00:00

* Reimported the HTML and Ruby bundle with the previous fix * Applied Rob Christie's patches of issues 109 and 110 0001-Deleted-because-this-is-supported-via-dwim-with-rcod.patch 0002-Updated-snippets.patch 0003-Added-setup.el-file-that-must-be-loaded-prior-to-loa.patch 0004-ruby-mode-class-and-module-snippets-updated.patch 0005-changes-to-counting-snippets-and-some-declaration-sn.patch patching some things manually. Thanks a lot Rob!
21 lines
504 B
Plaintext
21 lines
504 B
Plaintext
# -*- mode: snippet -*-
|
|
# key: cla
|
|
# contributor: Translated from TextMate Snippet
|
|
# name: class BlankSlate .. initialize .. end
|
|
## condition: "source.ruby"
|
|
# --
|
|
class ${1:BlankSlate}
|
|
instance_methods.each { |meth| undef_method(meth) unless meth =~ /\A__/ }
|
|
|
|
def initialize${2:$(if (string= yas/text "") "" "(")}${2:args}${2:$(if (string= yas/text "") "" ")")}
|
|
@${3:delegate} = ${4:delegate_object}
|
|
|
|
$0
|
|
end
|
|
|
|
def method_missing(meth, *args, &block)
|
|
@$3.send(meth, *args, &block)
|
|
end
|
|
|
|
|
|
end |