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