Class Merb::AcceptType
In: lib/merb-core/controller/mixins/responder.rb
Parent: Object

Methods

<=>   ==   eql?   hash   new   super_range   synonyms   to_s   to_sym  

Attributes

index  [R] 
media_range  [R] 
quality  [R] 
sub_type  [R] 
type  [R] 

Public Class methods

Parameters

entry<String>:The accept type pattern
index<Fixnum>:The index used for sorting accept types. A lower value indicates higher priority.

Public Instance methods

Compares two accept types for sorting purposes.

Parameters

entry<AcceptType>:The accept type to compare.

Returns

Fixnum:-1, 0 or 1, depending on whether entry has a lower, equal or higher priority than the accept type being compared.

An alias for eql?.

Parameters

entry<AcceptType>:The accept type to compare.

Returns

Boolean:True if the accept types are equal, i.e. if the synonyms for this accept type includes the entry media range.

Returns

Fixnum:A hash based on the super range.

Returns

String:The primary media range for this accept type, i.e. either the first synonym or, if none exist, the media range.

Returns

Array[String]:All Accept header values, such as "text/html", that match this type.

Returns

String:The accept type as a string, i.e. the media range.

Returns

Symbol: The type as a symbol, e.g. :html.

[Validate]