Module: Origen::SubBlocks::Parent
- Included in:
- Origen::SubBlocks
- Defined in:
- lib/origen/sub_blocks.rb
Overview
Jumping through some hoops here since many Origen modules talk about an owner, but would prefer to start standardizing on parent in future, so this should give most Origen models a parent method
Instance Method Summary collapse
- #owner=(obj) ⇒ Object (also: #parent=)
- #parent ⇒ Object (also: #owner)
Instance Method Details
#owner=(obj) ⇒ Object Also known as: parent=
96 97 98 99 100 101 102 |
# File 'lib/origen/sub_blocks.rb', line 96 def owner=(obj) if obj.respond_to?(:controller) && obj.controller @owner = obj.controller else @owner = obj end end |
#parent ⇒ Object Also known as: owner
90 91 92 |
# File 'lib/origen/sub_blocks.rb', line 90 def parent @owner end |