Class: OCL::SizeOf
Instance Method Summary collapse
-
#initialize(exp) ⇒ SizeOf
constructor
A new instance of SizeOf.
- #to_cexp ⇒ Object
Methods inherited from Paren
Methods inherited from Block
check_condition, result, #to_s
Constructor Details
#initialize(exp) ⇒ SizeOf
Returns a new instance of SizeOf.
262 263 264 265 |
# File 'lib/dbc/ocl.rb', line 262 def initialize(exp) raise ParseError, "cannot take the size of a condition" unless exp.cexp? super end |
Instance Method Details
#to_cexp ⇒ Object
266 267 268 |
# File 'lib/dbc/ocl.rb', line 266 def to_cexp "sizeof(#{@expression})" end |