module Shrine::Plugins::TypePredicates::ClassMethods

  1. lib/shrine/plugins/type_predicates.rb

Methods

Public Instance

  1. type_lookup

Public Instance methods

type_lookup(extension, database = nil)
[show source]
   # File lib/shrine/plugins/type_predicates.rb
17 def type_lookup(extension, database = nil)
18   database ||= opts[:type_predicates][:mime]
19   database   = MimeDatabase.new(database) if database.is_a?(Symbol)
20   database.call(extension.to_s)
21 end