Parent

Files

MIME::Types

Public Instance Methods

type_for_extension(ext) click to toggle source

Return the first found content-type for a value considered as an extension or the value itself

# File lib/restclient/request.rb, line 305
def type_for_extension ext
  candidates = @extension_index[ext]
  candidates.empty? ? ext : candidates[0].content_type
end

Public Class Methods

type_for_extension(ext) click to toggle source
# File lib/restclient/request.rb, line 311
def type_for_extension ext
  @__types__.type_for_extension ext
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.