Class: OrigenTesters::Decompiler::Pattern::Frontmatter
- Defined in:
- lib/origen_testers/decompiler/pattern/elements/frontmatter.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#comments ⇒ Array
Returns all the comments, in the order they appear.
-
#initialize(node:, context:) ⇒ Frontmatter
constructor
A new instance of Frontmatter.
-
#pattern_header ⇒ Array
Returns the topmost comment block.
- #to_yaml_hash ⇒ Object
Methods inherited from Base
#[], #execute!, #method_missing, #pinlist, #platform_nodes
Constructor Details
#initialize(node:, context:) ⇒ Frontmatter
Returns a new instance of Frontmatter.
7 8 9 10 |
# File 'lib/origen_testers/decompiler/pattern/elements/frontmatter.rb', line 7 def initialize(node:, context:) @source = :frontmatter super end |
Dynamic Method Handling
This class handles dynamic methods through the method_missing method in the class OrigenTesters::Decompiler::Pattern::Base
Instance Method Details
#comments ⇒ Array
Note:
This will <u>NOT</u> include the comment_header
.
Returns all the comments, in the order they appear.
26 27 28 |
# File 'lib/origen_testers/decompiler/pattern/elements/frontmatter.rb', line 26 def comments processor.comments end |
#pattern_header ⇒ Array
Returns the topmost comment block.
15 16 17 |
# File 'lib/origen_testers/decompiler/pattern/elements/frontmatter.rb', line 15 def pattern_header processor.pattern_header end |
#to_yaml_hash ⇒ Object
30 31 32 33 34 35 36 37 38 |
# File 'lib/origen_testers/decompiler/pattern/elements/frontmatter.rb', line 30 def to_yaml_hash { class: self.class.to_s, processor: processor.class.to_s, pattern_header: pattern_header, comments: comments, platform_nodes: _platform_nodes_ } end |