2017-04-01 20:28:57 +02:00
|
|
|
module Vool
|
|
|
|
class IfStatement < Statement
|
2017-04-02 18:12:42 +02:00
|
|
|
attr_accessor :condition , :if_true , :if_false
|
|
|
|
|
|
|
|
def initialize( cond = nil)
|
|
|
|
@condition = cond
|
|
|
|
@if_true = []
|
|
|
|
@if_false = []
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_false?
|
|
|
|
@if_false != nil
|
|
|
|
end
|
|
|
|
|
|
|
|
def has_true?
|
|
|
|
@if_true != nil
|
|
|
|
end
|
2017-04-01 20:28:57 +02:00
|
|
|
end
|
|
|
|
end
|