Class: OrigenTesters::Decompiler::Pattern::Base
- Inherits:
-
Object
- Object
- OrigenTesters::Decompiler::Pattern::Base
show all
- Defined in:
- lib/origen_testers/decompiler/pattern/elements/base.rb
Instance Attribute Summary collapse
-
#context ⇒ Object
(also: #decompiled_pattern)
readonly
Returns the value of attribute context.
-
#node ⇒ Object
(also: #processor)
readonly
Returns the value of attribute node.
Instance Method Summary
collapse
Constructor Details
#initialize(node:, context:, **options) ⇒ Base
11
12
13
14
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 11
def initialize(node:, context:, **options)
@context = context
@node = node
end
|
Dynamic Method Handling
This class handles dynamic methods through the method_missing method
#method_missing(m, *args, &block) ⇒ Object
24
25
26
27
28
29
30
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 24
def method_missing(m, *args, &block)
if platform_nodes.include?(m) || node.respond_to?(m)
node.send(m)
else
super
end
end
|
Instance Attribute Details
#context ⇒ Object
Also known as:
decompiled_pattern
Returns the value of attribute context.
5
6
7
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 5
def context
@context
end
|
#node ⇒ Object
Also known as:
processor
Returns the value of attribute node.
8
9
10
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 8
def node
@node
end
|
Instance Method Details
#[](node) ⇒ Object
16
17
18
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 16
def [](node)
node.find(node)
end
|
#execute! ⇒ Object
32
33
34
35
36
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 32
def execute!
if node.execute?
node.execute!(self)
end
end
|
#pinlist ⇒ Object
38
39
40
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 38
def pinlist
decompiled_pattern.pinlist.pinlist
end
|
20
21
22
|
# File 'lib/origen_testers/decompiler/pattern/elements/base.rb', line 20
def platform_nodes
node.platform_nodes
end
|