def parent
      self.class.where(self.class.arel_table[:l_ptr].lt(l_ptr))
                .where(self.class.arel_table[:r_ptr].gt(r_ptr))
                .where(depth: depth - 1)
                .try(:first)
    end
def parent
      self.class.where(self.class.arel_table[:l_ptr].lt(l_ptr))
                .where(self.class.arel_table[:r_ptr].gt(r_ptr))
                .where(depth: depth - 1)
                .try(:first)
    end
Getter Methods