* Small change to textmate_import.rb to import (commented) "scope" directive

* 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!
This commit is contained in:
capitaomorte
2009-10-13 13:28:14 +00:00
parent a18e5fda5d
commit deb0755824
144 changed files with 217 additions and 76 deletions

View File

@@ -2,13 +2,11 @@
# key: cla-
# contributor: Translated from TextMate Snippet
# name: class .. < DelegateClass .. initialize .. end
## condition: "source.ruby"
# --
class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < DelegateClass(${2:ParentClass})
def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
super(${4:del_obj})
$0
end
class ${1:`(yas/ruby-infer-class-name)`} < DelegateClass(${2:ParentClass})
def initialize${3:$(if (string= yas/text "") "" "(")}${3:args}${3:$(if (string= yas/text "") "" ")")}
super(${4:del_obj})
$0
end
end

View File

@@ -2,11 +2,10 @@
# key: cla
# contributor: Translated from TextMate Snippet
# name: class .. < ParentClass .. initialize .. end
## condition: "source.ruby"
# --
class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} < ${2:ParentClass}
def initialize${3/(^.*?\S.*)|.*/(?1:\()/}${3:args}${3/(^.*?\S.*)|.*/(?1:\))/}
$0
end
class ${1:`(yas/ruby-infer-class-name)`} < ${2:ParentClass}
def initialize${3:$(if (string= yas/text "") "" "(")}${3:args}${3:$(if (string= yas/text "") "" ")")}
$0
end
end

View File

@@ -2,11 +2,10 @@
# key: cla
# contributor: Translated from TextMate Snippet
# name: ClassName = Struct .. do .. end
## condition: "source.ruby"
# --
${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}} = Struct.new(:${2:attr_names}) do
def ${3:method_name}
$0
end
${1:`(yas/ruby-infer-class-name)`} = Struct.new(:${2:attr_names}) do
def ${3:method_name}
$0
end
end

View File

@@ -2,7 +2,8 @@
# key: cla
# contributor: Translated from TextMate Snippet
# name: class .. end
## condition: "source.ruby"
# --
class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
class ${1:`(yas/ruby-infer-class-name)`}
$0
end

View File

@@ -2,11 +2,11 @@
# key: cla
# contributor: Translated from TextMate Snippet
# name: class .. initialize .. end
## condition: "source.ruby"
# --
class ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
def initialize${2/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
$0
end
end
class ${1:`(yas/ruby-infer-class-name)`}
def initialize${2:$(if (string= yas/text "") "" "(")}${2:args}${2:$(if (string= yas/text "") "" ")")}
$0
end
end

View File

@@ -2,18 +2,19 @@
# 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/(^.*?\S.*)|.*/(?1:\()/}${2:args}${2/(^.*?\S.*)|.*/(?1:\))/}
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:delegate}.send(meth, *args, &block)
@$3.send(meth, *args, &block)
end

View File

@@ -2,6 +2,7 @@
# key: cla
# contributor: Translated from TextMate Snippet
# name: class << self .. end
## condition: "source.ruby"
# --
class << ${1:self}
$0

View File

@@ -2,8 +2,9 @@
# key: mod
# contributor: Translated from TextMate Snippet
# name: module .. ClassMethods .. end
## condition: "source.ruby"
# --
module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
module ${1:`(yas/ruby-infer-class-name)`}
module ClassMethods
$0
end

View File

@@ -2,7 +2,8 @@
# key: mod
# contributor: Translated from TextMate Snippet
# name: module .. end
## condition: "source.ruby"
# --
module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
$0
module ${1:`(yas/ruby-infer-class-name)`}
$0
end

View File

@@ -2,8 +2,9 @@
# key: mod
# contributor: Translated from TextMate Snippet
# name: module .. module_function .. end
## condition: "source.ruby"
# --
module ${1:${TM_FILENAME/(?:\A|_)([A-Za-z0-9]+)(?:\.rb)?/(?2::\u$1)/g}}
module ${1:`(yas/ruby-infer-class-name)`}
module_function
$0