vendor/bundle/ruby/1.8/gems/sinatra-1.2.8/lib/sinatra/base.rb
def accept_entry(entry)
      type, *options = entry.gsub(/\s/, '').split(';')
      quality = 0 # we sort smalles first
      options.delete_if { |e| quality = 1 - e[2..-1].to_f if e =~ /^q=/ }
      [type, [quality, type.count('*'), 1 - options.size]]
    end
# 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_entry(entry)
      type, *options = entry.gsub(/\s/, '').split(';')
      quality = 0 
      options.delete_if { |e| quality = 1 - e[2..-1].to_f if e =~ /^q=/ }
      [type, [quality, type.count('*'), 1 - options.size]]
    end
def accept_entry ( entry ) type , * options = entry . gsub ( / \s / , '' ) . split ( ';' ) quality = 0 options . delete_if { | e | quality = 1 - e [ 2 .. - 1 ] . to_f if e =~ / ^q= / } [ type , [ quality , type . count ( '*' ) , 1 - options . size ] ] end
Returns an array of acceptable media types for the response
Returns an array of acceptable media types for the response
# we sort smalles first
entry