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=
69 70 71 72 73 74 75 |
# File 'lib/origen/sub_blocks.rb', line 69 def owner=(obj) if obj.respond_to?(:controller) && obj.controller @owner = obj.controller else @owner = obj end end |
#parent ⇒ Object Also known as: owner
63 64 65 |
# File 'lib/origen/sub_blocks.rb', line 63 def parent @owner end |