Constants
SUPPORTED_TOOLS | = | %i[mini_mime mime_types mimemagic marcel rack_mime] |
Public Class methods
new(tool)
[show source]
# File lib/shrine/plugins/type_predicates.rb 63 def initialize(tool) 64 raise Error, "unknown type database #{tool.inspect}, supported databases are: #{SUPPORTED_TOOLS.join(",")}" unless SUPPORTED_TOOLS.include?(tool) 65 66 @tool = tool 67 end
Public Instance methods
call(extension)
[show source]
# File lib/shrine/plugins/type_predicates.rb 69 def call(extension) 70 send(:"lookup_with_#{@tool}", extension) 71 end