Module: MJ::Mixins::InheritedAttributes::InstanceMethods
- Defined in:
- lib/mj/mixins/inherited_attributes.rb
Overview
Instance methods
Instance Attribute Summary collapse
-
#parent ⇒ Object
Get the parent object.
Instance Method Summary collapse
Instance Attribute Details
#parent ⇒ Object
Get the parent object.
53 54 55 56 57 58 59 60 |
# File 'lib/mj/mixins/inherited_attributes.rb', line 53 def parent return nil if not @parent if @parent.is_a?( Proc ) @parent.call() else @parent end end |
Instance Method Details
#initialize(*args) ⇒ Object
45 46 47 |
# File 'lib/mj/mixins/inherited_attributes.rb', line 45 def initialize( *args ) @parent = nil end |