Class: OCL::Unary
Overview
Instance Method Summary
collapse
Methods inherited from Block
check_condition, result, #to_s
Constructor Details
#initialize(exp) ⇒ Unary
220
221
222
|
# File 'lib/dbc/ocl.rb', line 220
def initialize(exp)
@expression = exp
end
|
Instance Method Details
#cexp? ⇒ Boolean
223
224
225
|
# File 'lib/dbc/ocl.rb', line 223
def cexp?
@expression.cexp?
end
|
#to_cexp ⇒ Object
226
227
228
|
# File 'lib/dbc/ocl.rb', line 226
def to_cexp
"#{csymbol}#{@expression.to_cexp}"
end
|
#to_exp(result, indent_str = '') ⇒ Object
229
230
231
232
233
234
|
# File 'lib/dbc/ocl.rb', line 229
def to_exp(result, indent_str = '')
str = ''
str << @expression.to_exp(result, indent_str)
str << indent_str << "#{result} = #{csymbol}#{result};\n"
end
|