Class: OrigenTesters::Decompiler::Pattern::CommentBlock

Inherits:
Base
  • Object
show all
Defined in:
lib/origen_testers/decompiler/pattern/elements/comment_block.rb

Instance Attribute Summary

Attributes inherited from Base

#context, #node

Instance Method Summary collapse

Methods inherited from Base

#[], #execute!, #method_missing, #pinlist, #platform_nodes

Constructor Details

#initialize(parent) ⇒ CommentBlock

Returns a new instance of CommentBlock.



7
8
9
# File 'lib/origen_testers/decompiler/pattern/elements/comment_block.rb', line 7

def initialize(parent)
  super(node: parent, context: parent.context)
end

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class OrigenTesters::Decompiler::Pattern::Base

Instance Method Details

#commentsObject



11
12
13
# File 'lib/origen_testers/decompiler/pattern/elements/comment_block.rb', line 11

def comments
  processor.comments
end

#to_yaml_hash(options = {}) ⇒ Object



15
16
17
18
19
20
21
22
23
24
# File 'lib/origen_testers/decompiler/pattern/elements/comment_block.rb', line 15

def to_yaml_hash(options = {})
  {
    class:          self.class.to_s,
    index:          (node.respond_to?(:index) ? node.index : nil),
    type:           node.type,
    processor:      node.class.to_s,
    comments:       comments,
    platform_nodes: _platform_nodes_
  }
end