Sha256: 26590d248d93e6d5451b99f890d9d18d0af2946f87a0932ec1b3669e007434f2

Contents?: true

Size: 643 Bytes

Versions: 231

Compression:

Stored size: 643 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module Git
    module Organize
      class ReferenceUpdate
        enable_listable
        lists.add_symbol :operation, :remove

        common_constructor :repository, :reference, :operation

        def run_operation
          send("run_operation_#{operation}")
        end

        def to_s
          "#{reference} [#{operation}]"
        end

        private

        def reference_pathname
          repository.refs_root.join(reference)
        end

        def run_operation_remove
          reference_pathname.unlink
        end
      end
    end
  end
end

Version data entries

231 entries across 231 versions & 4 rubygems

Version Path
avm-git-0.18.0 lib/avm/git/organize/reference_update.rb
eac_tools-0.94.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.17.0 lib/avm/git/organize/reference_update.rb
eac_tools-0.86.5 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.16.0 lib/avm/git/organize/reference_update.rb
eac_tools-0.86.4 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.86.3 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.15.0 lib/avm/git/organize/reference_update.rb
eac_tools-0.86.2 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.84.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.83.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.82.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.14.0 lib/avm/git/organize/reference_update.rb
eac_tools-0.81.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.80.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.79.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.78.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.77.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.77.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.76.1 sub/avm-git/lib/avm/git/organize/reference_update.rb