Sha256: 1beddd674e94fd5aed275f796141d6f6ddf744a4ffead89da9be445eed3b9a1a

Contents?: true

Size: 772 Bytes

Versions: 42

Compression:

Stored size: 772 Bytes

Contents

# frozen_string_literal: true

require 'eac_ruby_utils/core_ext'
require 'avm/ruby/bundler/incompatible_parser/depends_on'
require 'avm/ruby/bundler/incompatible_parser/gem_conflict'
require 'avm/ruby/bundler/incompatible_parser/in_gemfile'

module Avm
  module Ruby
    module Bundler
      class IncompatibleParser
        class LineFactory
          TYPES = [GemConflict, InGemfile, DependsOn, VersionRequirement].freeze

          enable_simple_cache
          common_constructor :content do
            self.content = content.strip
          end

          delegate :blank?, to: :content

          private

          def result_uncached
            TYPES.lazy.map { |type| type.parse(content) }.find(&:present?)
          end
        end
      end
    end
  end
end

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
avm-tools-0.118.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.117.3 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.117.2 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.117.1 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.117.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.116.2 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.116.1 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.116.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.115.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.114.2 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.114.1 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.114.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.6 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.5 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.4 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.3 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.2 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.1 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.113.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb
avm-tools-0.112.0 lib/avm/ruby/bundler/incompatible_parser/line_factory.rb