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.



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

#commentsObject (readonly)

Returns the value of attribute comments.



112
113
114
# File 'lib/origen_testers/decompiler/nodes.rb', line 112

def comments
  @comments
end

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

Returns:

  • (Boolean)


135
136
137
# File 'lib/origen_testers/decompiler/nodes.rb', line 135

def execute?
  true
end