lib/dir_model/model.rb in dir_model-0.4.0 vs lib/dir_model/model.rb in dir_model-0.5.0

- old
+ new

@@ -3,8 +3,20 @@ extend ActiveSupport::Concern included do include Utils include Files + include Relations + + # @return [Model] return the parent, if this instance is a child + attr_reader :parent end + + # @param [NilClass] path not used here, see {Input} + # @param [Hash] options + # @option options [String] :parent if the instance is a child, pass the parent + def initialize(path=nil, options={}) + @parent = options[:parent] + end + end end