Class: Sexp::Conditional
Instance Method Summary
collapse
#statement_label
Methods inherited from Statement
#find_labelnode, #get_statement, #node_value, #statement_label, #statement_val, #statements, #traverse
#node_type, #node_value, #recursive_inject, #recursive_inject_parent, #recursive_select, #value
Instance Method Details
#condition ⇒ Object
895
896
897
|
# File 'lib/parser/parser_nodes.rb', line 895
def condition
recursive_select( Sexp::Expression).first
end
|
#if_not_true ⇒ Object
907
908
909
|
# File 'lib/parser/parser_nodes.rb', line 907
def if_not_true
return true_or_else[1] if true_or_else.length == 2
end
|
#if_true ⇒ Object
903
904
905
|
# File 'lib/parser/parser_nodes.rb', line 903
def if_true
true_or_else.first
end
|
#true_or_else ⇒ Object
899
900
901
|
# File 'lib/parser/parser_nodes.rb', line 899
def true_or_else
recursive_select( Sexp::Statement)
end
|