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.7.0 lib/rouge/guessers/mimetype.rb
rouge-3.6.0 lib/rouge/guessers/mimetype.rb
rouge-3.5.1 lib/rouge/guessers/mimetype.rb
rouge-3.5.0 lib/rouge/guessers/mimetype.rb
rouge-3.4.1 lib/rouge/guessers/mimetype.rb
rouge-3.4.0 lib/rouge/guessers/mimetype.rb
rouge-alda-3.3.0 lib/rouge/guessers/mimetype.rb
rouge-3.3.0 lib/rouge/guessers/mimetype.rb