Module: MJ::Mixins::InheritedAttributes::InstanceMethods

Defined in:
lib/mj/mixins/inherited_attributes.rb

Overview

Instance methods

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#parentObject

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