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
eac_tools-0.76.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.75.2 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.13.4 lib/avm/git/organize/reference_update.rb
eac_tools-0.75.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.75.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.74.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.74.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.73.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.72.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.70.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.70.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.69.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.69.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.68.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
avm-git-0.13.3 lib/avm/git/organize/reference_update.rb
eac_tools-0.67.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.67.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.66.0 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.65.1 sub/avm-git/lib/avm/git/organize/reference_update.rb
eac_tools-0.65.0 sub/avm-git/lib/avm/git/organize/reference_update.rb