Sha256: eb2d3b4bcde1ba8fae2823087cb5cd9edbf87734e5a6ae3d99a590776eec0c07

Contents?: true

Size: 594 Bytes

Versions: 7

Compression:

Stored size: 594 Bytes

Contents

module EacLauncher
  module Git
    module SubWarpBase
      private

      def parent_instance_uncached
        r = find_parent_instance(instance.parent)
        return r if r
        ::EacLauncher::Instances::Error.new('Git parent not found')
      end

      def find_parent_instance(current)
        return current if current.stereotype?(::EacLauncher::Stereotypes::Git)
        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

7 entries across 7 versions & 1 rubygems

Version Path
eac_launcher-0.5.1 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.5.0 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.4.0 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.3.2 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.3.1 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.3.0 lib/eac_launcher/git/sub_warp_base.rb
eac_launcher-0.2.2 lib/eac_launcher/git/sub_warp_base.rb