Class: BlifUtils::AST::ModelReference
- Inherits:
-
Object
- Object
- BlifUtils::AST::ModelReference
- Defined in:
- lib/blifutils/ast.rb
Instance Attribute Summary collapse
-
#formalAcutalList ⇒ Object
readonly
Returns the value of attribute formalAcutalList.
-
#modelName ⇒ Object
readonly
Returns the value of attribute modelName.
Instance Method Summary collapse
-
#initialize(modelName, formalAcutalList) ⇒ ModelReference
constructor
A new instance of ModelReference.
- #pretty_print(indent) ⇒ Object
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
#formalAcutalList ⇒ Object (readonly)
Returns the value of attribute formalAcutalList.
147 148 149 |
# File 'lib/blifutils/ast.rb', line 147 def formalAcutalList @formalAcutalList end |
#modelName ⇒ Object (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 |