Class: OCL::And
Overview
Binary
Instance Method Summary collapse
Methods inherited from Binary
Methods inherited from Block
check_condition, result, #to_s
Constructor Details
This class inherits a constructor from OCL::Binary
Instance Method Details
#csymbol ⇒ Object
190 |
# File 'lib/dbc/ocl.rb', line 190 def csymbol; '&&' end |
#to_exp(result, indent_str = '') ⇒ Object
174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 |
# File 'lib/dbc/ocl.rb', line 174 def to_exp(result, indent_str = '') str = '' if @expression1.cexp? str << Block.check_condition(@expression1.to_cexp, result, indent_str) else str << @expression1.to_exp(result, indent_str) end # if expression1 is true we must check condtion str << indent_str << "if (#{result}) {\n" if @expression2.cexp? str << Block.check_condition(@expression2.to_cexp, result, "\t" << indent_str) else str << @expression2.to_exp(result, "\t" << indent_str) end str << indent_str << "}\n" end |