Class: BlifUtils::AST::ModelReference

Inherits:
Object
  • Object
show all
Defined in:
lib/blifutils/ast.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(modelName, formalAcutalList) ⇒ ModelReference

Returns a new instance of ModelReference.



149
150
151
152
# File 'lib/blifutils/ast.rb', line 149

def initialize (modelName, formalAcutalList)
	@modelName = modelName
	@formalAcutalList = formalAcutalList
end

Instance Attribute Details

#formalAcutalListObject (readonly)

Returns the value of attribute formalAcutalList.



147
148
149
# File 'lib/blifutils/ast.rb', line 147

def formalAcutalList
  @formalAcutalList
end

#modelNameObject (readonly)

Returns the value of attribute modelName.



147
148
149
# File 'lib/blifutils/ast.rb', line 147

def modelName
  @modelName
end

Instance Method Details

#pretty_print(indent) ⇒ Object



154
155
156
157
158
159
160
161
162
# File 'lib/blifutils/ast.rb', line 154

def pretty_print (indent)
	str  = '    '*indent + "Model reference:\n"
	str += '    '*(indent+1) + "Model name: \"#{@modelName}\"\n"
	str += '    '*(indent+1) + "Formal / Actual mapping:\n"
	@formalAcutalList.each do |form_act|
		str += '    '*(indent+2) + "\"#{form_act[0]}\" -> \"#{form_act[1]}\"\n"
	end
	return str
end