vendor/bundle/ruby/1.8/gems/sinatra-1.2.8/lib/sinatra/base.rb
# Returns an array of acceptable media types for the response
Returns an array of acceptable media types for the response
Returns an array of acceptable media types for the response
def accept
      @env['sinatra.accept'] ||= begin
        entries = @env['HTTP_ACCEPT'].to_s.split(',')
        entries.map { |e| accept_entry(e) }.sort_by { |e| e.last }.map { |e| e.first }
      end
    end
def accept @env [ 'sinatra.accept' ] ||= begin entries = @env [ 'HTTP_ACCEPT' ] . to_s . split ( ',' ) entries . map { | e | accept_entry ( e ) } . sort_by { | e | e . last } . map { | e | e . first } end end
Returns an array of acceptable media types for the response
Returns an array of acceptable media types for the response