Sha256: f6e380125d8b93b995deab3a97ae5100929dd9730694adaca2106999025d1d7a

Contents?: true

Size: 983 Bytes

Versions: 8

Compression:

Stored size: 983 Bytes

Contents

# frozen_string_literal: true

module Git
  module Lint
    module CLI
      module Actions
        module Analyze
          # Handles analyze action for branch.
          class Branch
            def initialize analyzer: Analyzer.new, container: Container
              @analyzer = analyzer
              @container = container
            end

            def call
              parse
            rescue Errors::Base => error
              logger.error { error.message }
              kernel.abort
            end

            private

            attr_reader :analyzer, :container

            def parse
              analyzer.call do |collector, reporter|
                kernel.puts reporter
                kernel.abort if collector.errors?
              end
            end

            def repository = container[__method__]

            def kernel = container[__method__]

            def logger = container[__method__]
          end
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
git-lint-3.3.2 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.3.1 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.3.0 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.2.0 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.1.0 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.0.2 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.0.1 lib/git/lint/cli/actions/analyze/branch.rb
git-lint-3.0.0 lib/git/lint/cli/actions/analyze/branch.rb