Class: OrigenTesters::Decompiler::Nodes::Frontmatter
- Defined in:
- lib/origen_testers/decompiler/nodes.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#comments ⇒ Object
readonly
Returns the value of attribute comments.
-
#pattern_header ⇒ Object
(also: #header, #comment_header)
readonly
Returns the value of attribute pattern_header.
Attributes inherited from Node
Instance Method Summary collapse
- #execute!(context) ⇒ Object
- #execute? ⇒ Boolean
-
#initialize(pattern_header: nil, comments: nil, context:) ⇒ Frontmatter
constructor
A new instance of Frontmatter.
Methods inherited from Node
Constructor Details
#initialize(pattern_header: nil, comments: nil, context:) ⇒ Frontmatter
Returns a new instance of Frontmatter.
120 121 122 123 124 125 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 120 def initialize(pattern_header: nil, comments: nil, context:) @pattern_header = pattern_header @comments = comments || [] super(context: context, type: :frontmatter) end |
Instance Attribute Details
#comments ⇒ Object (readonly)
Returns the value of attribute comments.
114 115 116 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 114 def comments @comments end |
#pattern_header ⇒ Object (readonly) Also known as: header, comment_header
Returns the value of attribute pattern_header.
115 116 117 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 115 def pattern_header @pattern_header end |
Instance Method Details
#execute!(context) ⇒ Object
127 128 129 130 131 132 133 134 135 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 127 def execute!(context) pattern_header.each do |c| cc(c) end comments.each do |c| cc(c) end end |
#execute? ⇒ Boolean
137 138 139 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 137 def execute? true end |