lib/alf/reader.rb
# Returns a Reader instance for the given mime type.
#
# @param [String] mime_type a given (simplified) MIME type
# @param [...] args other arguments to pass to the reader constructor
# @return [Renderer] a Renderer instance, already wired if args are provided
#
Returns a Reader instance for the given mime type.
Returns a Reader instance for the given mime type .
def by_mime_type(mime_type, *args)
        if r = registered.find{|_,_,c| c.mime_type == mime_type}
          r.last.new(*args)
        else
          raise UnsupportedMimeTypeError, "No reader for `#{mime_type}`"
        end
      end
def by_mime_type ( mime_type , * args ) if r = registered . find { | _ , _ , c | c . mime_type == mime_type } r . last . new ( * args ) else raise UnsupportedMimeTypeError , "No reader for `#{mime_type}`" end end
Returns a Reader instance for the given mime type.
Returns a Reader instance for the given mime type .
a Renderer instance, already wired if args are provided
a Renderer instance already wired if args are provided
Renderer
mime_type
<not_specific>
args
<not_specific>
<not_specific>
args other arguments to pass to the reader constructor
args other arguments to pass to the reader constructor