Class: SystemRDL::Evaluator::ComponentInst
- Inherits:
-
Object
- Object
- SystemRDL::Evaluator::ComponentInst
- Includes:
- Common
- Defined in:
- lib/systemrdl/evaluator/component_insts.rb
Instance Attribute Summary collapse
-
#inst_id ⇒ Object
readonly
Returns the value of attribute inst_id.
Attributes included from Common
#component, #parent, #token_range
Instance Method Summary collapse
- #evaluate(instance, component_definition, **optargs) ⇒ Object
-
#initialize(inst_id, inst_values, token_range) ⇒ ComponentInst
constructor
A new instance of ComponentInst.
Methods included from Common
Constructor Details
#initialize(inst_id, inst_values, token_range) ⇒ ComponentInst
Returns a new instance of ComponentInst.
67 68 69 70 71 |
# File 'lib/systemrdl/evaluator/component_insts.rb', line 67 def initialize(inst_id, inst_values, token_range) super(token_range) @inst_id = inst_id @inst_values = inst_values end |
Instance Attribute Details
#inst_id ⇒ Object (readonly)
Returns the value of attribute inst_id.
73 74 75 |
# File 'lib/systemrdl/evaluator/component_insts.rb', line 73 def inst_id @inst_id end |
Instance Method Details
#evaluate(instance, component_definition, **optargs) ⇒ Object
75 76 77 78 |
# File 'lib/systemrdl/evaluator/component_insts.rb', line 75 def evaluate(instance, component_definition, **optargs) inst_values = eval_inst_values(instance, **optargs) component_definition.create_instances(instance, @inst_id.value, inst_values, @token_range, **optargs) end |