Class: OrigenTesters::Decompiler::Nodes::Frontmatter

Inherits:
Node
  • Object
show all
Defined in:
lib/origen_testers/decompiler/nodes.rb

Instance Attribute Summary collapse

Attributes inherited from Node

#context, #type

Instance Method Summary collapse

Methods inherited from Node

inherited, #platform_nodes

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

#commentsObject (readonly)

Returns the value of attribute comments.



114
115
116
# File 'lib/origen_testers/decompiler/nodes.rb', line 114

def comments
  @comments
end

#pattern_headerObject (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

Returns:

  • (Boolean)


137
138
139
# File 'lib/origen_testers/decompiler/nodes.rb', line 137

def execute?
  true
end