rubyx/lib/ast/conditional_expression.rb

14 lines
284 B
Ruby
Raw Normal View History

2014-05-05 09:02:02 +02:00
module Ast
class ConditionalExpression < Expression
attr_reader :cond, :if_true, :if_false
def initialize cond, if_true, if_false
@cond, @if_true, @if_false = cond, if_true, if_false
end
def attributes
[:cond, :if_true, :if_false]
2014-05-05 09:02:02 +02:00
end
end
end