# File lib/declarative_authorization/obligation_scope.rb, line 331
    def path_to_join (path)
      case path.length
      when 0 then nil
      when 1 then path[0]
      else
        hash = { path[-2] => path[-1] }
        path[0..-3].reverse.each do |elem|
          hash = { elem => hash }
        end
        hash
      end
    end