Merge pull request #176 from signaturelabs/ruby_each_with_object

each_with_object snippet for Ruby
This commit is contained in:
Eustáquio Rangel 2013-02-27 09:32:52 -08:00
commit f80cc3e03f

View File

@ -289,6 +289,12 @@ snippet eawid
each_with_index do |${1:e}, ${2:i}| each_with_index do |${1:e}, ${2:i}|
${3} ${3}
end end
snippet eawo
each_with_object(${1:init}) { |${2:e}, ${3:var}| ${4} }
snippet eawod
each_with_object(${1:init}) do |${2:e}, ${3:var}|
${4}
end
snippet reve snippet reve
reverse_each { |${1:e}| ${2} } reverse_each { |${1:e}| ${2} }
snippet reved snippet reved