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 private
def simplify_condition( cond ) def simplify_condition( cond )
return unless cond.condition.is_a?(ScopeStatement) condition = cond.condition
cond.condition = cond.condition.first if cond.condition.single? return unless condition.is_a?(ScopeStatement)
cond.condition = condition.first if condition.single?
end end
def instance_name sym def instance_name sym

View File

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