Class: OCL::Paren

Inherits:
Block
  • Object
show all
Defined in:
lib/dbc/ocl.rb

Overview

Block

Direct Known Subclasses

SizeOf

Instance Method Summary collapse

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

Returns:

  • (Boolean)

114
115
116
# File 'lib/dbc/ocl.rb', line 114

def cexp?
	@expression.cexp?
end

#to_cexpObject


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