Sha256: 066217e3e32745a9f3d2eb323e95b2c2aa9988ab82856a4be7d09333849afe1a
Contents?: true
Size: 744 Bytes
Versions: 46
Compression:
Stored size: 744 Bytes
Contents
# frozen_string_literal: true require 'avm/projects/stereotype' require 'avm/launcher/errors/base' module EacLauncher 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
Version data entries
46 entries across 46 versions & 1 rubygems