Sha256: fd7b5cebc5b06bccc771c94a289797ae89ba0fdf8c2ef3ac93b38060ab0d0a5b

Contents?: true

Size: 810 Bytes

Versions: 17

Compression:

Stored size: 810 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module Avm
  module Scms
    class Base
      enable_abstract_methods
      enable_simple_cache
      abstract_methods :update, :valid?
      common_constructor :path do
        self.path = path.to_pathname
      end

      # @return [Avm::Scms::Commit,NilClass]
      def commit_if_change(_message = nil)
        raise_abstract_method __method__
      end

      def name
        self.class.name.demodulize
      end

      # @return [Enumerable<Avm::Scms::Base>]
      def subs
        raise_abstract_method __method__
      end

      def to_s
        name
      end

      private

      # @return [Avm::Scms::Base]
      def parent_scm_uncached
        ::Avm::Registry.scms.detect_by_path_optional(path.parent)
      end
    end
  end
end

Version data entries

17 entries across 17 versions & 3 rubygems

Version Path
avm-0.28.0 lib/avm/scms/base.rb
eac_tools-0.10.0 sub/avm/lib/avm/scms/base.rb
avm-0.27.0 lib/avm/scms/base.rb
eac_tools-0.9.0 sub/avm/lib/avm/scms/base.rb
avm-0.26.0 lib/avm/scms/base.rb
eac_tools-0.8.0 sub/avm/lib/avm/scms/base.rb
eac_tools-0.7.0 sub/avm/lib/avm/scms/base.rb
avm-0.25.0 lib/avm/scms/base.rb
eac_tools-0.6.0 sub/avm/lib/avm/scms/base.rb
eac_tools-0.5.0 sub/avm/lib/avm/scms/base.rb
avm-0.24.0 lib/avm/scms/base.rb
eac_tools-0.4.0 sub/avm/lib/avm/scms/base.rb
eac_tools-0.3.0 sub/avm/lib/avm/scms/base.rb
eac_tools-0.2.2 sub/avm/lib/avm/scms/base.rb
avm-0.23.0 lib/avm/scms/base.rb
avm-0.22.0 lib/avm/scms/base.rb
avm-tools-0.120.0 sub/avm/lib/avm/scms/base.rb