Sha256: 9a60cf8f48e9f5ad23a04e3b82c8a2916f519225be7499b578675e0feba9593f

Contents?: true

Size: 312 Bytes

Versions: 48

Compression:

Stored size: 312 Bytes

Contents

# frozen_string_literal: true

module Rouge
  module Guessers
    class Mimetype < Guesser
      attr_reader :mimetype
      def initialize(mimetype)
        @mimetype = mimetype
      end

      def filter(lexers)
        lexers.select { |lexer| lexer.mimetypes.include? @mimetype }
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 3 rubygems

Version Path
rouge-3.26.0 lib/rouge/guessers/mimetype.rb
rouge-3.25.0 lib/rouge/guessers/mimetype.rb
rouge-3.24.0 lib/rouge/guessers/mimetype.rb
rouge-3.23.0 lib/rouge/guessers/mimetype.rb
rouge-3.22.0 lib/rouge/guessers/mimetype.rb
rouge-3.21.0 lib/rouge/guessers/mimetype.rb
rouge-3.20.0 lib/rouge/guessers/mimetype.rb
rouge-3.19.0 lib/rouge/guessers/mimetype.rb
rouge-3.18.0 lib/rouge/guessers/mimetype.rb
rouge-3.17.0 lib/rouge/guessers/mimetype.rb
rouge-3.16.0 lib/rouge/guessers/mimetype.rb
rouge-3.15.0 lib/rouge/guessers/mimetype.rb
rouge-3.14.0 lib/rouge/guessers/mimetype.rb
rouge-3.13.0 lib/rouge/guessers/mimetype.rb
rouge-3.12.0 lib/rouge/guessers/mimetype.rb
rouge-3.11.1 lib/rouge/guessers/mimetype.rb
rouge-3.11.0 lib/rouge/guessers/mimetype.rb
rouge-3.10.0 lib/rouge/guessers/mimetype.rb
rouge-3.9.0 lib/rouge/guessers/mimetype.rb
rouge-3.8.0 lib/rouge/guessers/mimetype.rb