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-tools-0.69.2 lib/avm/git/organize/reference_update.rb
avm-tools-0.69.1 lib/avm/git/organize/reference_update.rb
avm-tools-0.69.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.68.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.67.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.66.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.65.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.64.2 lib/avm/git/organize/reference_update.rb
avm-tools-0.64.1 lib/avm/git/organize/reference_update.rb
avm-tools-0.64.0 lib/avm/git/organize/reference_update.rb
avm-tools-0.63.0 lib/avm/git/organize/reference_update.rb