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.
118 119 120 121 122 123 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 118 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.
112 113 114 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 112 def comments @comments end |
#pattern_header ⇒ Object (readonly) Also known as: header, comment_header
Returns the value of attribute pattern_header.
113 114 115 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 113 def pattern_header @pattern_header end |
Instance Method Details
#execute!(context) ⇒ Object
125 126 127 128 129 130 131 132 133 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 125 def execute!(context) pattern_header.each do |c| cc(c) end comments.each do |c| cc(c) end end |
#execute? ⇒ Boolean
135 136 137 |
# File 'lib/origen_testers/decompiler/nodes.rb', line 135 def execute? true end |