Module: Lotus::Action::Mime::ClassMethods

Defined in:
lib/lotus/action/mime.rb

Overview

Since:

  • 0.1.0

Instance Method Summary collapse

Instance Method Details

#format_to_mime_type(format) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.

Since:

  • 0.2.0



60
61
62
63
64
# File 'lib/lotus/action/mime.rb', line 60

def format_to_mime_type(format)
  configuration.mime_type_for(format) ||
    ::Rack::Mime.mime_type(".#{ format }", nil) or
    raise Lotus::Controller::UnknownFormatError.new(format)
end