From 3c92e707dad4ff6d14db176a9edc1f1746fd5857 Mon Sep 17 00:00:00 2001 From: Torsten Ruger Date: Mon, 11 Sep 2017 14:23:06 +0300 Subject: [PATCH] refactor --- lib/vool/statements/class_statement.rb | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/vool/statements/class_statement.rb b/lib/vool/statements/class_statement.rb index c498ed04..61639d29 100644 --- a/lib/vool/statements/class_statement.rb +++ b/lib/vool/statements/class_statement.rb @@ -14,10 +14,7 @@ module Vool # compilation to the next layer, mom # context coming in for class is nil, also for methods, henceafter a method is passed down def to_mom( _ ) - methods = [] - @body.statements.each do |meth| - methods << meth.to_mom( nil ) - end + methods = @body.statements.collect { |meth| meth.to_mom( nil ) } Mom::Statements.new(methods) end