Sha256: ab2a38ab16abc83dea7db6812437476d00c291838a8e4ba215f2a4f3e0dda42a
Contents?: true
Size: 798 Bytes
Versions: 109
Compression:
Stored size: 798 Bytes
Contents
# frozen_string_literal: true require 'avm/projects/stereotype' require 'avm/launcher/errors/base' module Avm module Launcher module Git module SubWarpBase private def parent_instance_uncached r = find_parent_instance(instance.parent) return r if r ::Avm::Launcher::Errors::Base.new('Git parent not found') end def find_parent_instance(current) if ::Avm::Projects::Stereotype.git_stereotypes.any? { |s| current.stereotype?(s) } return current end current.parent ? find_parent_instance(current.parent) : nil end def to_parent_git_path instance.logical.gsub(%r{\A#{Regexp.quote(parent_instance.logical)}/}, '') end end end end end
Version data entries
109 entries across 109 versions & 2 rubygems