Class: OCL::Block
- Inherits:
-
Object
show all
- Defined in:
- lib/dbc/ocl.rb
Overview
Constant Summary
collapse
- @@results =
0
Class Method Summary
collapse
Instance Method Summary
collapse
Class Method Details
.check_condition(condition, result, indent_str = '') ⇒ Object
100
101
102
|
# File 'lib/dbc/ocl.rb', line 100
def Block.check_condition(condition, result, indent_str = '')
"#{indent_str}#{result} = (int)(#{condition});\n"
end
|
.result ⇒ Object
97
98
99
|
# File 'lib/dbc/ocl.rb', line 97
def Block.result
"__ocl_#{@@results += 1}_"
end
|
Instance Method Details
#to_s ⇒ Object
104
105
106
107
|
# File 'lib/dbc/ocl.rb', line 104
def to_s
raise ParseError, "invalid expression" unless cexp?
to_cexp
end
|