Sha256: a66bb6b422d309b52f56ac98c570d5d6c3b18faaf49a1f7b686c71995a9d8899

Contents?: true

Size: 480 Bytes

Versions: 7

Compression:

Stored size: 480 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'

module EacGit
  module RemoteLike
    class LsResult
      class << self
        def by_ls_remote_command_output(output)
          new(
            output.each_line.map { |line| line.strip.split(/\s+/) }.to_h { |x| [x[1], x[0]] } # rubocop:disable Style/MapToHash
          )
        end
      end

      common_constructor :hashes
      delegate :fetch, :[], :count, :any?, :empty?, to: :hashes
    end
  end
end

Version data entries

7 entries across 7 versions & 2 rubygems

Version Path
eac_tools-0.86.5 sub/eac_git/lib/eac_git/remote_like/ls_result.rb
eac_tools-0.86.4 sub/eac_git/lib/eac_git/remote_like/ls_result.rb
eac_tools-0.86.3 sub/eac_git/lib/eac_git/remote_like/ls_result.rb
eac_git-0.16.0 lib/eac_git/remote_like/ls_result.rb
eac_tools-0.86.2 sub/eac_git/lib/eac_git/remote_like/ls_result.rb
eac_git-0.15.0 lib/eac_git/remote_like/ls_result.rb
eac_tools-0.84.2 sub/eac_git/lib/eac_git/remote_like/ls_result.rb