Class: OCL::Paren
Overview
Block
Direct Known Subclasses
Instance Method Summary collapse
- #cexp? ⇒ Boolean
-
#initialize(exp) ⇒ Paren
constructor
A new instance of Paren.
- #to_cexp ⇒ Object
- #to_exp(result, indent_str = '') ⇒ Object
Methods inherited from Block
check_condition, result, #to_s
Constructor Details
#initialize(exp) ⇒ Paren
Returns a new instance of Paren.
111 112 113 |
# File 'lib/dbc/ocl.rb', line 111 def initialize(exp) @expression = exp end |
Instance Method Details
#cexp? ⇒ Boolean
114 115 116 |
# File 'lib/dbc/ocl.rb', line 114 def cexp? @expression.cexp? end |
#to_cexp ⇒ Object
120 121 122 |
# File 'lib/dbc/ocl.rb', line 120 def to_cexp "(#{@expression})" end |
#to_exp(result, indent_str = '') ⇒ Object
117 118 119 |
# File 'lib/dbc/ocl.rb', line 117 def to_exp(result, indent_str = '') @expression.to_exp(result, indent_str) end |