added each_with_object Ruby snippets

This commit is contained in:
Mike Foley 2013-02-26 15:51:09 -08:00
parent 6e58f722f3
commit 63551117aa

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