Module: HDLRuby::Low::Hparent
- Included in:
- Behavior, Chunk, Code, Delay, Event, Expression, Scope, SignalI, Statement, SystemI, SystemT, Type, When
- Defined in:
- lib/HDLRuby/hruby_low.rb
Overview
Gives parent definition and access properties to an hardware object.
Instance Attribute Summary collapse
-
#parent ⇒ Object
The parent.
Instance Method Summary collapse
-
#hierarchy ⇒ Object
Get the full parents hierachy.
-
#scope ⇒ Object
Get the parent scope.
Instance Attribute Details
#parent ⇒ Object
The parent.
45 46 47 |
# File 'lib/HDLRuby/hruby_low.rb', line 45 def parent @parent end |
Instance Method Details
#hierarchy ⇒ Object
Get the full parents hierachy.
68 69 70 71 72 73 74 75 76 |
# File 'lib/HDLRuby/hruby_low.rb', line 68 def hierarchy res = [] cur = self while(cur) do res << cur cur = cur.parent end return res end |
#scope ⇒ Object
Get the parent scope.
61 62 63 64 65 |
# File 'lib/HDLRuby/hruby_low.rb', line 61 def scope cur = self.parent cur = cur.parent until cur.is_a?(Scope) return cur end |