Class: OCL::Binary
Overview
Implies
Instance Method Summary collapse
- #cexp? ⇒ Boolean
-
#initialize(exp1, exp2) ⇒ Binary
constructor
A new instance of Binary.
- #to_cexp ⇒ Object
Methods inherited from Block
check_condition, result, #to_s
Constructor Details
#initialize(exp1, exp2) ⇒ Binary
Returns a new instance of Binary.
161 162 163 164 |
# File 'lib/dbc/ocl.rb', line 161 def initialize(exp1, exp2) @expression1 = exp1 @expression2 = exp2 end |
Instance Method Details
#cexp? ⇒ Boolean
165 166 167 |
# File 'lib/dbc/ocl.rb', line 165 def cexp? @expression1.cexp? and @expression2.cexp? end |
#to_cexp ⇒ Object
168 169 170 |
# File 'lib/dbc/ocl.rb', line 168 def to_cexp "(#{@expression1.to_cexp} #{csymbol} #{@expression2.to_cexp})" end |