Sha256: aee84a640f9a1d2314e5e8a2e45875f3262214f23d73bffaf469f64a82795ffb

Contents?: true

Size: 869 Bytes

Versions: 8

Compression:

Stored size: 869 Bytes

Contents

module Bibliothecary
  module Analyser
    module Determinations
      # calling this with contents=nil can produce less-informed
      # results, but kept for back compat
      def determine_kind(filename, contents = nil)
        determine_kind_from_info(FileInfo.new(nil, filename, contents))
      end

      def determine_kind_from_info(info)
        first_matching_mapping_details(info)
          .fetch(:kind, nil)
      end

      # calling this with contents=nil can produce less-informed
      # results, but kept for back compat
      def determine_can_have_lockfile(filename, contents = nil)
        determine_can_have_lockfile_from_info(FileInfo.new(nil, filename, contents))
      end

      def determine_can_have_lockfile_from_info(info)
        first_matching_mapping_details(info)
          .fetch(:can_have_lockfile, true)
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
bibliothecary-8.2.4 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.2.3 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.2.2 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.2.1 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.2.0 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.1.1 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.1.0 lib/bibliothecary/analyser/determinations.rb
bibliothecary-8.0.0 lib/bibliothecary/analyser/determinations.rb