Sha256: 3964b1fc9ef129ee1d86589c44f27982dd3d6a5b9733dc8b474f09511095dcf6

Contents?: true

Size: 574 Bytes

Versions: 97

Compression:

Stored size: 574 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module Git
    class AutoCommitPath
      require_sub __FILE__, include_modules: true
      common_constructor :git, :path do
        self.path = path.to_pathname
      end

      def class_name
        ruby_class_name || relative_path.to_path
      end

      def commit_message
        r = class_name
        r += ': remove' unless path.file?
        r + '.'
      end

      def relative_path
        path.expand_path.relative_path_from(git.root_path.expand_path)
      end
    end
  end
end

Version data entries

97 entries across 97 versions & 4 rubygems

Version Path
eac_tools-0.49.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.48.1 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.48.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.47.2 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.47.1 sub/avm-git/lib/avm/git/auto_commit_path.rb
avm-git-0.10.1 lib/avm/git/auto_commit_path.rb
eac_tools-0.47.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.46.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.45.2 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.45.1 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.45.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.44.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.43.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.42.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
avm-git-0.10.0 lib/avm/git/auto_commit_path.rb
eac_tools-0.41.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.40.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
avm-git-0.9.0 lib/avm/git/auto_commit_path.rb
eac_tools-0.39.0 sub/avm-git/lib/avm/git/auto_commit_path.rb
eac_tools-0.38.0 sub/avm-git/lib/avm/git/auto_commit_path.rb