neo2vim 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/neo2vim.rb +3 -3
- metadata +1 -1
data/lib/neo2vim.rb
CHANGED
@@ -20,9 +20,9 @@ class Neo2Vim
|
|
20
20
|
# Supported pattern: @neovim.{type}({name}, attr1 = value1, attr2 = value2, ...)
|
21
21
|
if line =~ /^\s*@neovim\.(\w+)\(((?:'\w+')|(?:"\w+"))(.+)/
|
22
22
|
basic = {type: $1, name: $2[1..-2]}
|
23
|
-
args = $3.scan(/\s*,\s*(\w+)\s*=\s*((?:'[^']*')|(?:"[^"]*"))/).map {|name, value|
|
23
|
+
args = Hash[$3.scan(/\s*,\s*(\w+)\s*=\s*((?:'[^']*')|(?:"[^"]*"))/).map {|name, value|
|
24
24
|
[name.to_sym, value[1..-2]]
|
25
|
-
}
|
25
|
+
}]
|
26
26
|
basic.merge(args)
|
27
27
|
else
|
28
28
|
nil
|
@@ -82,7 +82,7 @@ class Neo2Vim
|
|
82
82
|
end
|
83
83
|
def initialize source, destination
|
84
84
|
@names = ["autoload_function", "function", "command", "autocmd"]
|
85
|
-
@stores =
|
85
|
+
@stores = Hash[@names.map{|name| [name, {}]}]
|
86
86
|
@annotation = nil
|
87
87
|
@plugin_class_name = nil
|
88
88
|
@in_plugin_class = false
|