Class: SystemRDL::Evaluator::PropertyDefinition
- Inherits:
-
Object
- Object
- SystemRDL::Evaluator::PropertyDefinition
- Defined in:
- lib/systemrdl/evaluator/property.rb
Instance Attribute Summary collapse
-
#default_value ⇒ Object
Returns the value of attribute default_value.
-
#dynamic_assign ⇒ Object
Returns the value of attribute dynamic_assign.
-
#name ⇒ Object
readonly
Returns the value of attribute name.
-
#per_element_assign ⇒ Object
Returns the value of attribute per_element_assign.
-
#ref_target ⇒ Object
Returns the value of attribute ref_target.
-
#targets ⇒ Object
Returns the value of attribute targets.
-
#types ⇒ Object
Returns the value of attribute types.
Instance Method Summary collapse
- #create(instance) ⇒ Object
-
#initialize(name) {|_self| ... } ⇒ PropertyDefinition
constructor
A new instance of PropertyDefinition.
- #target?(instance) ⇒ Boolean
Constructor Details
#initialize(name) {|_self| ... } ⇒ PropertyDefinition
Returns a new instance of PropertyDefinition.
65 66 67 68 |
# File 'lib/systemrdl/evaluator/property.rb', line 65 def initialize(name) @name = name yield(self) end |
Instance Attribute Details
#default_value ⇒ Object
Returns the value of attribute default_value.
76 77 78 |
# File 'lib/systemrdl/evaluator/property.rb', line 76 def default_value @default_value end |
#dynamic_assign ⇒ Object
Returns the value of attribute dynamic_assign.
74 75 76 |
# File 'lib/systemrdl/evaluator/property.rb', line 74 def dynamic_assign @dynamic_assign end |
#name ⇒ Object (readonly)
Returns the value of attribute name.
70 71 72 |
# File 'lib/systemrdl/evaluator/property.rb', line 70 def name @name end |
#per_element_assign ⇒ Object
Returns the value of attribute per_element_assign.
75 76 77 |
# File 'lib/systemrdl/evaluator/property.rb', line 75 def per_element_assign @per_element_assign end |
#ref_target ⇒ Object
Returns the value of attribute ref_target.
73 74 75 |
# File 'lib/systemrdl/evaluator/property.rb', line 73 def ref_target @ref_target end |
#targets ⇒ Object
Returns the value of attribute targets.
71 72 73 |
# File 'lib/systemrdl/evaluator/property.rb', line 71 def targets @targets end |
#types ⇒ Object
Returns the value of attribute types.
72 73 74 |
# File 'lib/systemrdl/evaluator/property.rb', line 72 def types @types end |
Instance Method Details
#create(instance) ⇒ Object
84 85 86 87 |
# File 'lib/systemrdl/evaluator/property.rb', line 84 def create(instance) value = eval_value(instance) Property.new(instance, self, value) end |
#target?(instance) ⇒ Boolean
78 79 80 81 82 |
# File 'lib/systemrdl/evaluator/property.rb', line 78 def target?(instance) return false if instance.root? targets.nil? || targets.include?(instance.layer) end |