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-4.5.1 lib/rouge/guessers/mimetype.rb
rouge-4.5.0 lib/rouge/guessers/mimetype.rb
rouge-4.4.0 lib/rouge/guessers/mimetype.rb
rouge-4.3.0 lib/rouge/guessers/mimetype.rb
rouge-4.2.1 lib/rouge/guessers/mimetype.rb
rouge-4.2.0 lib/rouge/guessers/mimetype.rb
rouge-4.1.3 lib/rouge/guessers/mimetype.rb
rouge-4.1.2 lib/rouge/guessers/mimetype.rb
rouge-4.1.1 lib/rouge/guessers/mimetype.rb
mumukit-content-type-1.12.1 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/guessers/mimetype.rb
mumukit-content-type-1.12.0 vendor/bundle/ruby/2.7.0/gems/rouge-3.30.0/lib/rouge/guessers/mimetype.rb
rouge-4.1.0 lib/rouge/guessers/mimetype.rb
rouge-4.0.1 lib/rouge/guessers/mimetype.rb
rouge-4.0.0 lib/rouge/guessers/mimetype.rb
rouge-3.30.0 lib/rouge/guessers/mimetype.rb
rouge-3.29.0 lib/rouge/guessers/mimetype.rb
rouge-3.28.0 lib/rouge/guessers/mimetype.rb
rouge-3.27.0 lib/rouge/guessers/mimetype.rb
rouge-3.26.1 lib/rouge/guessers/mimetype.rb
mumukit-content-type-1.11.1 vendor/bundle/ruby/2.6.0/gems/rouge-3.26.0/lib/rouge/guessers/mimetype.rb