small cleanup

This commit is contained in:
Torsten Ruger 2017-04-05 14:03:48 +03:00
parent bc0b71d0cd
commit 488af5b8f7
2 changed files with 6 additions and 2 deletions

View File

@ -190,8 +190,9 @@ module Vool
private
def simplify_condition( cond )
return unless cond.condition.is_a?(ScopeStatement)
cond.condition = cond.condition.first if cond.condition.single?
condition = cond.condition
return unless condition.is_a?(ScopeStatement)
cond.condition = condition.first if condition.single?
end
def instance_name sym

View File

@ -13,6 +13,9 @@ module Vool
def first
@statements.first
end
def length
@statements.length
end
end
class ScopeStatement < Statements